-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy patheslint.config.mjs
More file actions
49 lines (47 loc) · 1.12 KB
/
eslint.config.mjs
File metadata and controls
49 lines (47 loc) · 1.12 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
import {defineConfig} from 'eslint/config'
import tsParser from '@typescript-eslint/parser'
import github from 'eslint-plugin-github'
import escompat from 'eslint-plugin-escompat'
import compat from 'eslint-plugin-compat'
import globals from 'globals'
const githubFlatConfigs = github.getFlatConfigs()
export default defineConfig([
githubFlatConfigs.browser,
githubFlatConfigs.recommended,
...githubFlatConfigs.typescript,
...escompat.configs['flat/typescript'],
{
ignores: ['dist/**', 'node_modules/**'],
plugins: {
compat,
escompat,
},
languageOptions: {
parser: tsParser,
globals: {
...globals.browser,
...globals.builtin,
},
},
rules: {
'no-invalid-this': 'off',
'no-shadow': 'off',
'@typescript-eslint/no-unnecessary-type-constraint': 'off',
},
settings: {
'import/resolver': {
typescript: true,
node: {
extensions: ['.js', '.ts', '.tsx'],
moduleDirectory: ['node_modules'],
},
},
},
},
{
files: ['test/*'],
rules: {
'no-shadow': 'off',
},
},
])