-
Notifications
You must be signed in to change notification settings - Fork 8
/
eslint.config.mjs
44 lines (43 loc) · 1.33 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
43
44
import eslintJS from '@eslint/js'
import eslintTS from 'typescript-eslint'
import pluginPrettier from 'eslint-plugin-prettier/recommended'
import pluginSecurity from 'eslint-plugin-security'
import pluginJest from 'eslint-plugin-jest'
export default eslintTS.config(
eslintJS.configs.recommended,
...eslintTS.configs.strictTypeChecked,
pluginJest.configs['flat/recommended'],
pluginSecurity.configs.recommended,
{
ignores: [
'eslint.config.mjs',
'coverage/*',
'lib/*'
]
},
{
languageOptions: {
sourceType: 'module',
parserOptions: {
project: true,
tsconfigRootDir: import.meta.dirname
}
},
rules: {
'@typescript-eslint/no-namespace': 'warn',
"@typescript-eslint/no-unused-vars": [
"error",
{
"args": "all",
"argsIgnorePattern": "^_",
"caughtErrors": "all",
"varsIgnorePattern": "^_"
}
],
'@typescript-eslint/consistent-type-imports': 'error',
'@typescript-eslint/consistent-type-exports': 'error',
'@typescript-eslint/restrict-template-expressions': 'off'
}
},
pluginPrettier
)