-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
73 lines (68 loc) · 1.97 KB
/
.eslintrc.json
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
// ESLint configuration <https://eslint.org/docs/user-guide/configuring>
{
"extends": "@kevinoid/eslint-config/node.js",
"rules": {
// allow dangling underscores in identifiers
// this is the convention used in Zlib, so we adopt it for this project
"no-underscore-dangle": "off",
// Allow requiring devDependencies for build and test
"import/no-extraneous-dependencies": ["error", {
"devDependencies": [
"gulpfile.js",
"test-bin/**",
"test-lib/**",
"test/**"
]
}],
// Allow CommonJS modules
"unicorn/prefer-module": "off",
// Don't prefer top-level await
// Since top-level await is only supported in ECMAScript Modules (ESM)
"unicorn/prefer-top-level-await": "off"
},
"overrides": [
{
"files": [
"bin/*.js"
],
"rules": {
// Executable scripts should have a shebang
"n/shebang": "off"
}
},
{
"files": [
"lib/errors.js"
],
"rules": {
"comma-dangle": ["error", "only-multiline"],
"curly": "off",
"global-require": "off",
"indent": "off",
"new-cap": "off",
"no-restricted-syntax": "off",
"no-use-before-define": ["error", { "functions": false }],
"nonblock-statement-body-position": ["error", "below"],
"operator-linebreak": ["error", "after"],
"unicorn/no-null": "off",
"unicorn/prefer-prototype-methods": "off"
}
},
{
"files": [
"lib/zlib-internal.js"
],
"rules": {
"comma-dangle": ["error", "only-multiline"],
"curly": "off",
"import/order": "off",
"no-extra-parens": ["error", "functions"],
"no-use-before-define": ["error", { "functions": false }],
"nonblock-statement-body-position": ["error", "below"],
"operator-linebreak": ["error", "after"],
"unicorn/no-null": "off",
"unicorn/prefer-spread": "off"
}
}
]
}