-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.json
68 lines (52 loc) · 1.79 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
{
"env": {
"commonjs": true,
"es6": true,
"node": true,
"mocha": true
},
"extends": [
"airbnb-base"
],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parserOptions": {
"ecmaVersion": 2018
},
"rules": {
// enforce return after a callback
"callback-return": "off",
// require all requires be top-level
// https://eslint.org/docs/rules/global-require
"global-require": "error",
// enforces error handling in callbacks (node environment)
"handle-callback-err": "off",
// disallow use of the Buffer() constructor
// https://eslint.org/docs/rules/no-buffer-constructor
"no-buffer-constructor": "error",
// disallow mixing regular variable and require declarations
"no-mixed-requires": ["off", false],
//disallow semi column
"semi": [2, "never"],
// disallow use of new operator with the require function
"no-new-require": "error",
// disallow string concatenation with __dirname and __filename
// https://eslint.org/docs/rules/no-path-concat
"no-path-concat": "error",
// disallow use of process.env
"no-process-env": "off",
// disallow process.exit()
"no-process-exit": "off",
// restrict usage of specified node modules
"no-restricted-modules": "off",
// disallow use of synchronous methods (off by default)
"no-sync": "off",
"no-underscore-dangle": "off",
"arrow-parens": "off",
"prefer-promise-reject-errors": "off",
"class-methods-use-this": "off",
"no-use-before-define": ["error", { "functions": false, "classes": true }]
}
}