-
Notifications
You must be signed in to change notification settings - Fork 47
/
.eslintrc.js
53 lines (49 loc) · 1.54 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
49
50
51
52
53
module.exports = {
"root": true,
"env": {
"browser": true,
"node": true,
"es6": true
},
"extends": "eslint:recommended",
"parserOptions": {
"sourceType": "module"
},
"rules": {
"no-unused-vars": [
"warn",
{ "vars": "all", "args": "after-used", "ignoreRestSiblings": false }
],
"no-console": [
"warn"
],
"indent": [
"warn",
4,
{SwitchCase: 1}
],
"linebreak-style": [
"off",
"unix"
],
"quotes": [
"error",
"double"
],
"semi": [
"error",
"always"
],
"no-var": 2,
/* Node.js */
"callback-return": "error", //enforce return after a callback
"global-require": 2, //enforce require() on top-level module scope
"handle-callback-err": 2, //enforce error handling in callbacks
"no-mixed-requires": 2, //disallow mixing regular variable and require declarations
"no-new-require": 2, //disallow use of new operator with the require function
"no-path-concat": "error", //disallow string concatenation with __dirname and __filename
"no-process-exit": 2, //disallow process.exit()
"no-restricted-modules": [1, ""], //restrict usage of specified node modules
"no-sync": 1, //disallow use of synchronous methods
}
};