-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy patheslint.config.mjs
47 lines (46 loc) · 1.41 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
45
46
47
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: [
'jest.config.mjs',
'eslint.config.mjs',
'rollup.config.js',
'coverage/*',
'dist/*',
'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
)