-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.eslintrc
77 lines (77 loc) · 2.98 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
66
67
68
69
70
71
72
73
74
75
76
77
{
"extends": ["eslint:recommended", "plugin:react/recommended"],
"parser": "@babel/eslint-parser",
"env": {
"browser": true,
"es6": true,
"jest": true,
"node": true
},
"settings": {
"react": {
"version": "17.0"
},
"import/resolver": {
"webpack": {
"config": "webpack.config.base.babel.js"
}
}
},
"plugins": ["react", "react-hooks", "import"],
"globals": {
"API_BASE": false,
"BUILD_TIME": false
},
"rules": {
"array-bracket-newline": ["error", "consistent"],
"array-bracket-spacing": "error",
"array-callback-return": "error",
"arrow-parens": "error",
"arrow-spacing": "error",
"block-scoped-var": "error",
"comma-dangle": "error",
"curly": "error",
"eol-last": "error",
"eqeqeq": "error",
"import/no-unresolved": "error",
"import/order": ["error", { "groups": ["builtin", "external", "internal", "parent", "sibling", "index"], "newlines-between": "always" }],
"indent": ["error", 2, { "SwitchCase": 1 }],
"jsx-quotes": "error",
"key-spacing": "error",
"keyword-spacing": "error",
"linebreak-style": ["error", "unix"],
"max-len": ["error", { "code": 120, "tabWidth": 2 }],
"no-console": "warn",
"no-duplicate-imports": ["error", { "includeExports": true }],
"no-invalid-this": "error",
"no-multi-spaces": "error",
"no-multiple-empty-lines": ["error", { "max": 1, "maxEOF": 0 }],
"no-restricted-globals": ["error", "event"],
"no-trailing-spaces": "error",
"no-unused-expressions": "error",
"no-useless-escape": "off",
"no-var": "error",
"object-curly-spacing": ["error", "always"],
"object-curly-newline": ["error", { "consistent": true, "multiline": true }],
"object-property-newline": ["error", { "allowAllPropertiesOnSameLine": true }],
"object-shorthand": "error",
"operator-linebreak": "error",
"quotes": ["error", "single", { "avoidEscape": true }],
"react/jsx-closing-bracket-location": "error",
"react/jsx-curly-spacing": ["error", { "when": "never", "children": true }],
"react/jsx-equals-spacing": "error",
"react/jsx-first-prop-new-line": "error",
"react/jsx-indent": ["error", 2, { "checkAttributes": false, "indentLogicalExpressions": false }],
"react/jsx-tag-spacing": ["error", { "beforeSelfClosing": "always", "closingSlash": "never", "afterOpening": "never", "beforeClosing": "never" }],
"react/jsx-wrap-multilines": ["error", { "declaration": "parens-new-line", "assignment": "parens-new-line", "return": "parens-new-line", "arrow": "parens-new-line", "condition": "parens-new-line", "logical": "parens-new-line", "prop": "parens-new-line" }],
"react/no-array-index-key": "warn",
"react/no-did-mount-set-state": "error",
"react/sort-comp": "error",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"semi": ["error", "never"],
"space-before-blocks": "error",
"space-in-parens": "error",
"space-infix-ops": "error"
}
}