-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.mjs
More file actions
56 lines (54 loc) · 1.25 KB
/
eslint.config.mjs
File metadata and controls
56 lines (54 loc) · 1.25 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
54
55
56
import js from '@eslint/js'
import tseslint from '@typescript-eslint/eslint-plugin'
import tsParser from '@typescript-eslint/parser'
import jest from 'eslint-plugin-jest'
import prettier from 'eslint-config-prettier'
import globals from 'globals'
const jestStyle = jest.configs['flat/style']
export default [
{
ignores: ['coverage', 'dist', 'node_modules']
},
js.configs.recommended,
{
files: ['**/*.ts'],
linterOptions: {
reportUnusedDisableDirectives: true
},
languageOptions: {
parser: tsParser,
parserOptions: {
sourceType: 'module'
},
globals: globals.browser
},
plugins: {
'@typescript-eslint': tseslint
},
rules: {
...tseslint.configs.recommended.rules,
'@typescript-eslint/member-delimiter-style': 'off',
'@typescript-eslint/no-non-null-assertion': 'error'
}
},
{
files: ['*.{js,mjs}'],
languageOptions: {
sourceType: 'module',
globals: globals.node
},
rules: {
'@typescript-eslint/no-var-requires': 'off'
}
},
{
...jestStyle,
files: ['tests/**/*.ts'],
rules: {
...jestStyle.rules,
'jest/prefer-comparison-matcher': 'error',
'jest/prefer-equality-matcher': 'error'
}
},
prettier
]