-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.mjs
31 lines (30 loc) · 934 Bytes
/
eslint.config.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import pluginJs from '@eslint/js'
import importPlugin from 'eslint-plugin-import'
import globals from 'globals'
import tseslint from 'typescript-eslint'
/** @type {import('eslint').Linter.Config[]} */
export default [
{ files: ['**/*.{js,mjs,cjs,ts}'] },
{ ignores: ['node_modules/**', 'dist/**'] },
{ languageOptions: { globals: globals.node } },
{
plugins: {
import: importPlugin,
},
rules: {
'no-console': ['warn', { allow: ['warn', 'error', 'info'] }],
'no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'no-unused-expressions': 'error',
'import/order': [
'error',
{
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'],
'newlines-between': 'always',
alphabetize: { order: 'asc', caseInsensitive: true },
},
],
},
},
pluginJs.configs.recommended,
...tseslint.configs.recommended
]