-
Notifications
You must be signed in to change notification settings - Fork 2
/
.eslintrc
65 lines (65 loc) · 1.99 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
65
{
"extends": "react-app",
"plugins": ["simple-import-sort"],
"ignorePatterns": ["/stories/*.js"],
"rules": {
"quotes": [
"error",
"double",
{ "avoidEscape": true, "allowTemplateLiterals": true }
],
"no-unused-vars": "warn",
"no-var": "error",
"no-console": "warn",
"no-debugger": "warn",
"no-plusplus": "off",
"no-shadow": "off",
"vars-on-top": "off",
"no-underscore-dangle": "off", // var _foo;
"func-names": "off", // setTimeout(function () {}, 0);
"prefer-template": "off",
"no-nested-ternary": "off",
"max-classes-per-file": "off",
"consistent-return": "off",
"no-restricted-syntax": ["off", "ForOfStatement"], // disallow specified syntax(ex. WithStatement)
"prefer-arrow-callback": "error", // Require using arrow functions for callbacks
"require-await": "error",
// "arrow-parens": ["error", "as-needed"], // a => {}
"default-case": "off",
"no-param-reassign": ["error", { "props": false }],
"no-unused-expressions": ["error", {
"allowTernary": true, // a || b
"allowShortCircuit": true, // a ? b : 0
"allowTaggedTemplates": true
}],
"indent": ["error", 2, { "SwitchCase": 1 }],
"semi": ["error", "always"],
"comma-dangle": ["error", {
"arrays": "never",
"functions": "never",
"objects": "always-multiline",
"imports": "always-multiline",
"exports": "always-multiline"
}],
"eol-last": ["error", "always"],
"key-spacing": ["error", {
"beforeColon": false,
"afterColon": true
}],
"object-curly-spacing": [2, "always"],
"simple-import-sort/imports": "error",
"simple-import-sort/exports": "error",
"camelcase": ["error", { "properties": "always" }],
"quote-props": 0,
"keyword-spacing": "error",
"no-multiple-empty-lines": "warn",
"space-before-function-paren": [
"error",
{
"anonymous": "always",
"named": "never",
"asyncArrow": "always"
}
]
}
}