-
-
Notifications
You must be signed in to change notification settings - Fork 1k
/
eslint.config.mjs
68 lines (64 loc) · 1.97 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
import nodePlugin from 'eslint-plugin-n'
import mocha from 'eslint-plugin-mocha'
import globals from 'globals'
import js from '@eslint/js'
import eslintConfigPrettier from 'eslint-config-prettier'
import eslint from '@eslint/js'
import typescriptEslint from 'typescript-eslint'
export default [
{
ignores: ['packages/*/node_modules', '**/docs', 'packages/*/dist/*'],
},
js.configs.recommended,
nodePlugin.configs['flat/recommended-script'],
mocha.configs['flat'].recommended,
...typescriptEslint.configs.recommended,
eslintConfigPrettier,
{
languageOptions: {
globals: {
...globals.node,
...globals.mocha,
assert: false,
makeTestFeature: false,
shouldReject: false,
},
ecmaVersion: 12,
sourceType: 'commonjs',
},
rules: {
'no-extra-semi': 'off',
'@typescript-eslint/no-extra-semi': 'off',
'n/no-process-exit': 'off',
'no-var': 'error',
'n/no-extraneous-import': [
'error',
{
allowModules: ['sinon', 'chai'],
},
],
'n/no-missing-import': 'off',
'n/no-missing-require': 'off',
'n/no-unpublished-import': 'off',
'n/no-unpublished-require': 'off',
'n/no-unsupported-features/es-builtins': 'error',
'n/no-unsupported-features/es-syntax': 'off',
'n/no-unsupported-features/node-builtins': 'error',
'n/hashbang': 'off',
'object-shorthand': 'error',
'prefer-arrow-callback': 'error',
'prefer-const': 'error',
'prefer-template': 'error',
'mocha/no-exclusive-tests': 'error',
'mocha/no-hooks-for-single-case': 'off',
'mocha/no-mocha-arrows': 'off',
'mocha/no-pending-tests': 'error',
'mocha/no-setup-in-describe': 'off',
strict: ['error', 'never'],
'valid-jsdoc': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-require-imports': 'off',
},
},
]