-
-
Notifications
You must be signed in to change notification settings - Fork 160
/
eslint.config.js
82 lines (80 loc) · 1.68 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
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
import globals from 'globals';
import jsdoc from './src/index.js';
// import canonical from 'eslint-config-canonical';
// import canonicalJsdoc from 'eslint-config-canonical/jsdoc.js';
const common = {
linterOptions: {
reportUnusedDisableDirectives: 'off'
},
plugins: {
jsdoc
},
};
export default [
// canonical,
// canonicalJsdoc,
...jsdoc.configs['examples-and-default-expressions'],
{
// Must be by itself
ignores: ['dist/**', '.ignore/**/*.js'],
},
{
...common,
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
globals: globals.node
},
settings: {
jsdoc: {
mode: 'typescript'
}
},
rules: {
'array-element-newline': 0,
'filenames/match-regex': 0,
'import/extensions': 0,
'import/no-useless-path-segments': 0,
'prefer-named-capture-group': 0,
'unicorn/no-array-reduce': 0,
'unicorn/no-unsafe-regex': 0,
'unicorn/prefer-array-some': 0,
'unicorn/prevent-abbreviations': 0,
'unicorn/import-index': 0,
'linebreak-style': 0,
'no-inline-comments': 0,
'no-extra-parens': 0
}
},
{
...common,
files: ['.ncurc.cjs'],
languageOptions: {
parserOptions: {
ecmaFeatures: {
impliedStrict: false
},
},
sourceType: 'script'
},
rules: {
'import/no-commonjs': 0,
strict: [
'error',
'global'
]
}
},
{
...common,
files: ['test/**/*.js'],
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module'
},
rules: {
'no-restricted-syntax': 0,
'unicorn/prevent-abbreviations': 0
}
},
];