-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.json
70 lines (69 loc) · 2.76 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
/**
* Linting rules extend and modify the Airbnb style guide.
* See: https://github.com/airbnb/javascript
*/
{
"extends": "airbnb-base",
"plugins": ["import"],
"env": {
"es6": true,
"mocha": true,
"node": true
},
"rules": {
"array-bracket-spacing": ["off"], // Requires a missing option for my preferred style.
"arrow-parens": ["error", "as-needed"],
"comma-dangle": ["error", {
"arrays": "never", // Supports comma-first rule with multiline arrays.
"objects": "always-multiline",
"imports": "always-multiline",
"exports": "always-multiline",
"functions": "never"
}],
"comma-style": ["error", "last", { "exceptions": { "ArrayExpression": true } }],
"default-param-last": ["warn"], // Requires substantial code restructuring.
"func-names": ["error", "as-needed"],
"func-style": ["warn", "declaration", { "allowArrowFunctions": true }],
"indent": ["off"], // Requires a missing option for my preferred style.
"no-bitwise": ["error", { "allow": ["~"] }],
"no-else-return": ["error", { "allowElseIf": true }],
"no-multiple-empty-lines": ["error", {"max": 2}],
"no-nested-ternary": ["off"], // Requires a missing option for my preferred style.
"no-param-reassign": ["error", { "props": false }],
"no-plusplus": ["error", { "allowForLoopAfterthoughts": true }],
"no-underscore-dangle": ["off"],
"no-undef": ["warn"],
"no-unused-vars": ["error", {
"args": "after-used",
"argsIgnorePattern" : "^_$",
"vars": "all",
"ignoreRestSiblings": true
}],
"no-use-before-define": ["error", {
"functions": false,
"classes": true,
"variables": true
}],
"object-shorthand": ["error", "properties", {
"avoidQuotes": true
}],
"operator-linebreak": ["off"],
"prefer-const": ["error", { "destructuring": "all", "ignoreReadBeforeAssign": true }],
"spaced-comment": ["error", "always", {
"line": {
"exceptions": ["-", "+", "/"],
"markers": ["=", "!"] // space here to support sprockets directives
},
"block": {
"exceptions": ["-", "+"],
"markers": ["=", "!"], // space here to support sprockets directives
"balanced": true
}
}],
"import/exports-last": ["error"],
"import/newline-after-import": ["error", { "count": 2 }],
"import/no-named-as-default": ["warn"],
"import/order": ["error", { "newlines-between": "never" }],
"import/prefer-default-export": ["off"]
}
}