-
-
Notifications
You must be signed in to change notification settings - Fork 18
/
eslint.config.js
38 lines (36 loc) · 1.03 KB
/
eslint.config.js
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
32
33
34
35
36
37
38
import js from '@eslint/js';
import tseslint from 'typescript-eslint';
import typescriptParser from '@typescript-eslint/parser';
import typescriptPlugin from '@typescript-eslint/eslint-plugin';
export default [
js.configs.recommended,
tseslint.configs.eslintRecommended,
...tseslint.configs.recommended,
{
files: ['**/*.ts', '**/*.js'],
languageOptions: {
parser: typescriptParser,
globals: {
process: 'readonly',
console: 'readonly'
}
},
plugins: {
typescriptPlugin: typescriptPlugin
},
rules: {
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-unused-vars': 'error',
'no-warning-comments': [
'warn',
{ terms: ['todo'], location: 'start' }
],
'no-magic-numbers': [
'error',
{
ignore: [-1, 0, 1]
}
]
}
}
];