-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.eslintrc.js
71 lines (71 loc) · 2.35 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
70
71
module.exports = {
"env": {
"es6": true,
"node": true
},
"extends": ["eslint:recommended", "plugin:import/errors"],
"parser": "babel-eslint",
"parserOptions": {
"ecmaFeatures": {
"experimentalObjectRestSpread": true,
"jsx": true
},
"sourceType": "module"
},
"globals": {
"fetch": true
},
"rules": {
"import/no-duplicates": ["error"],
"import/no-unresolved": 2,
"import/newline-after-import": ["error"],
"import/first": "error",
"padding-line-between-statements": [
"error",
{ "blankLine": "never", "prev": "import", "next": "import" },
{ "blankLine": "always", "prev": "*", "next": "export" }
],
"semi": ["error", "always"],
"space-infix-ops": ["error", { "int32Hint": false }],
"no-unused-vars": ["error", { "ignoreRestSiblings": true }],
"comma-spacing": ["error", { "before": false, "after": true }],
"getter-return": "error",
"no-multi-spaces": "error",
"no-param-reassign": "error",
"no-throw-literal": "error",
"no-undef-init": "error",
"global-require": "error",
"camelcase": ["warn", { "properties": "always" }],
"comma-dangle": ["error", "never"],
"comma-style": ["error", "last"],
"computed-property-spacing": ["error", "never"],
"eol-last": ["error", "never"],
"keyword-spacing": ["error", { "after": true, "before": true }],
"new-cap": ["error", { "newIsCap": true }],
"new-parens": "error",
"no-whitespace-before-property": "error",
"space-in-parens": ["error", "never"],
"quote-props": ["warn", "as-needed"],
"no-multiple-empty-lines": ["error", { "max": 1, "maxEOF": 0, "maxBOF": 0 }],
"object-curly-spacing": ["error", "always", { "objectsInObjects": false }],
"array-bracket-spacing": ["error", "never"],
"key-spacing": ["error"],
"space-before-blocks": "error",
"block-spacing": "error",
"no-trailing-spaces": "error",
"prefer-arrow-callback": "warn",
"arrow-parens": "off",
"indent": ["error", 2, { "SwitchCase": 1 }],
"linebreak-style": ["error", "windows"],
"quotes": ["error", "single"],
"complexity": ["warn", { "max": 5 }],
"max-nested-callbacks": ["warn", 3],
"max-params": ["warn", 6],
"prefer-destructuring": ["error", {
"array": true,
"object": true
}, {
"enforceForRenamedProperties": false
}]
}
}