-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy patheslint.config.js
43 lines (42 loc) · 1.04 KB
/
eslint.config.js
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
const globals = require('globals')
const eslint = require('@eslint/js')
const tseslint = require('typescript-eslint')
const mocha = require('eslint-plugin-mocha')
module.exports = [
eslint.configs.recommended,
...tseslint.configs.recommended,
{
languageOptions: {
parser: tseslint.parser,
globals: {
...globals.node,
...globals.es2015
}
},
plugins: {
'@typescript-eslint': tseslint.plugin,
mocha
}
},
{
files: ['eslint.config.js'],
rules: {
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-require-imports': 'off'
}
},
{
files: ['src/**/*.test.ts'],
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-require-imports': 'off',
'mocha/no-exclusive-tests': 'error',
'mocha/no-setup-in-describe': 'off',
'mocha/max-top-level-suites': 'off',
'mocha/no-mocha-arrows': 'off'
}
},
{
ignores: ['**/node_modules/', '**/dist/', '**/coverage/', '**/.nyc_output/']
}
]