-
Notifications
You must be signed in to change notification settings - Fork 3
/
.eslintrc.js
69 lines (62 loc) · 1.73 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
// http://eslint.org/docs/rules/
module.exports = {
"extends": "eslint:recommended",
"env": {
"es6": true,
"jest": true,
"node": true
},
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
},
"rules": {
// Possible Errors
"no-console": "off",
// Best Practices
"block-scoped-var": "warn",
"curly": "warn",
"no-else-return": "warn",
"no-unused-expressions": "warn",
"radix": "error",
// Strict Mode
"strict": ["warn", "never"],
// Variables
"no-shadow": "warn",
"no-use-before-define": ["error", { "functions": false }],
"no-unused-vars": "warn",
// Node.js and CommonJS
"global-require": "warn",
"no-mixed-requires": ["warn", { "grouping": true, "allowCall": false }],
// Stylistic Issues
"array-bracket-spacing": "warn",
"block-spacing": "warn",
"brace-style": "warn",
"camelcase": "warn",
"comma-spacing": "warn",
"eol-last": "warn",
"func-call-spacing": "warn",
"indent": [2, 2, { "SwitchCase": 1 }],
"key-spacing": "warn",
"keyword-spacing": "warn",
"linebreak-style": ["warn", "unix"],
"max-depth": "warn",
"no-trailing-spaces": "warn",
"no-whitespace-before-property": "warn",
"padded-blocks": ["warn", { "classes": "always" }],
"quotes": ["warn", "single"],
"semi": ["warn", "never"],
// ECMAScript 6
"arrow-parens": ["warn", "as-needed"],
"arrow-spacing": "warn",
"no-duplicate-imports": "warn",
"no-useless-rename": "warn",
"no-var": "warn",
"prefer-const": "warn",
"prefer-spread": "warn",
"prefer-template": "warn",
"rest-spread-spacing": "warn",
"sort-imports": "warn",
"template-curly-spacing": ["warn", "never"]
}
}