-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
48 lines (43 loc) · 1.18 KB
/
.eslintrc.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
'use strict';
module.exports = {
ignorePatterns: [ 'package-lock.json', 'package.json' ],
env: {
node: true,
es2021: true
},
parserOptions: {
ecmaVersion: 'latest'
},
extends: [
'wikimedia',
'wikimedia/node',
'wikimedia/language/es2022'
],
rules: {
// Might enable this later.
'no-loop-func': 'off', // Only matters for async callbacks, many false positives for synchronous.
// Necessary to skip, e.g. process.exit() may be necessary for linter.
'no-console': 'off',
'no-process-exit': 'off',
'jsdoc/no-undefined-types': 'off', // Don't want to add unnecessary require() just to use a class in JSDoc annotation
// Unavoidable when loading assets.
'security/detect-non-literal-fs-filename': 'off',
// Not exactly against applying these in the future,
// but they are very annoying with the current codestyle ("for ( var [ a, b ] of ..." loops, etc.).
'prefer-const': 'off',
// Don't want to apply these.
'array-bracket-spacing': 'off',
'computed-property-spacing': 'off',
'max-len': 'off',
'no-var': 'off'
},
overrides: [
{
// Duplicate "@doc" keys in JSON file
files: [ 'config.json' ],
rules: {
'no-dupe-keys': 'off'
}
}
]
};