This repository has been archived by the owner on Apr 20, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.json
54 lines (54 loc) · 1.82 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
{
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"env": {
"es6": true,
"browser": true,
"node": true
},
"rules": {
// prohibits bitwise operators (&, |, ^, etc.)
"no-bitwise": 2,
// require {} for every new block or scope
"curly": [1, "all"],
// require using === or !== always
"eqeqeq": [2, "always"],
// require calling Object.prototype.hasOwnProperty.call(obj, key) in for in loops
"guard-for-in": 1,
// disallow calling obj.hasOwnProperty. Use Object.prototype.hasOwnProperty.call instead
"no-prototype-builtins": 1,
// required parentheses around imediately invoked functions
"wrap-iife": [2, "inside"],
// enforce comments' first word to be lowercase
"no-empty": [1, { "allowEmptyCatch": true }],
// prohibits the use of ++ and --
"no-plusplus": 1,
// enforce double quotations or backticks whenever needed
"quotes": [2, "double"],
// prevent the use of global variables unless declared
"no-undef": 2,
// force using strict at the beginning of the file (global param)
"strict": [2, "global"],
// enforce a maximum of 4 parameter per function
"max-params": [1, 4],
// enforce a maximum depth of 4 per function
"max-depth": [1, 4],
// enforce a maximum of 15 statements per function
"max-statements": [1, 15],
// enforce a maximum of 50 lines per functions
"max-lines-per-function": [1, 50],
// enforce a max length of 100 for code and 70 for commments
"max-len": [1, {"code": 100, "comments": 80, "ignoreUrls": true }],
// limit the max nested callbacks to 2
"max-nested-callbacks": [1, 2],
// require using let or const
"no-var": 2,
// require using a whitespace after a comment
"spaced-comment": [2, "always"]
}
}