-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
53 lines (52 loc) · 1.4 KB
/
eslint.config.js
File metadata and controls
53 lines (52 loc) · 1.4 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import js from '@eslint/js'
import tsParser from '@typescript-eslint/parser'
import tsPlugin from '@typescript-eslint/eslint-plugin'
export default [
{
ignores: [
'node_modules/**',
'dist/**',
'lib/**',
'*.config.js',
'*.config.cjs',
'.husky/**'
]
},
js.configs.recommended,
{
files: ['**/*.ts'],
languageOptions: {
parser: tsParser,
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
project: './tsconfig.json'
},
globals: {
console: 'readonly',
process: 'readonly',
URL: 'readonly'
}
},
plugins: {
'@typescript-eslint': tsPlugin
},
rules: {
'no-undef': 'off',
'no-unused-vars': 'off',
'no-console': 'off',
'semi': 'off',
'@typescript-eslint/no-unused-vars': 'error',
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-require-imports': 'error',
'@typescript-eslint/no-var-requires': 'error',
'@typescript-eslint/no-extraneous-class': 'error',
'@typescript-eslint/no-namespace': 'error',
'@typescript-eslint/no-useless-constructor': 'error',
'@typescript-eslint/no-empty-interface': 'error',
'@typescript-eslint/prefer-includes': 'error',
'@typescript-eslint/prefer-string-starts-ends-with': 'error',
'@typescript-eslint/array-type': 'error'
}
}
]