-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc
64 lines (64 loc) · 1.76 KB
/
.eslintrc
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
{
"env": {
"node": true,
"browser": false
},
"rules": {
// 2-space indentation
"indent": [2, 2, {"SwitchCase": 1}],
// Require strings to use single quotes
"quotes": [2, "single"],
// Allow only unix line-endings
"linebreak-style": [2, "unix"],
// Always require semicolons
"semi": [2, "always"],
// Require curly braces for multi-line control statements
"curly": [2, "multi-line"],
// Always handle callback error cases
"handle-callback-err": [2, "^err"],
// Require JSDoc for all function definitions
"valid-jsdoc": [2, {
"requireReturn": false,
"requireReturnDescription": false,
"prefer": {
"return": "returns"
}
}],
"require-jsdoc": [2, {
"require": {
"FunctionDeclaration": true
}
}],
"no-redeclare": [2, { "builtinGlobals": true }],
"no-shadow": [2, { "builtinGlobals": true, "hoist": "all" }],
// Disallow using variables before they've been defined
// functions are ok
"no-use-before-define": [2, "nofunc"],
"no-shadow-restricted-names": 2,
"no-extra-semi": 2,
// Disallow unused variables
"no-unused-vars": 2,
"no-undef": 2,
// Use if () { }
// ^ space
"keyword-spacing": 2,
// Use if () { }
// ^ space
"space-before-blocks": [2, "always"],
// eslint can't handle this, so the check is disabled.
"key-spacing": 0,
"strict": 0,
// Do not force dot-notation
"dot-notation": 0,
"eol-last": 0,
"no-new": 0,
"semi-spacing": 0,
// Allow multi spaces around operators since they are
// used for alignment. This is not consistent in the
// code.
"no-multi-spaces": 0,
"eqeqeq": 0,
"no-mixed-requires": 0,
"no-console": 0
}
}