-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.eslintrc.js
84 lines (84 loc) · 2.18 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
72
73
74
75
76
77
78
79
80
81
82
83
84
module.exports = {
parser: "babel-eslint",
extends: ["airbnb", "standard", "prettier"],
plugins: ["prettier", "standard"],
globals: {
fetch: false
},
rules: {
semi: [2, "always"],
"semi-spacing": ["error", { before: false, after: true }],
"comma-dangle": [2, "always-multiline"],
"space-before-function-paren": [
"error",
{
anonymous: "always",
named: "never",
asyncArrow: "always"
}
],
"no-unused-vars": [2, { vars: "all", args: "none" }],
"no-unreachable": 2,
"no-trailing-spaces": 2,
"react/jsx-closing-bracket-location": "off",
"react/jsx-closing-tag-location": "off",
"react/jsx-curly-spacing": "off",
"react/jsx-equals-spacing": "off",
"react/jsx-first-prop-new-line": "off",
"no-mixed-operators": "off",
"no-tabs": "off",
"no-unexpected-multiline": "off",
quotes: "off",
"space-before-blocks": [
"error",
{ functions: "always", keywords: "always", classes: "always" }
],
"object-curly-spacing": ["error", "always"],
indent: [
"error",
4,
{
SwitchCase: 1,
VariableDeclarator: {
var: 2,
let: 2,
const: 3
},
FunctionDeclaration: {
body: 4,
parameters: "first"
},
outerIIFEBody: 4,
MemberExpression: 1,
CallExpression: { arguments: "first" },
ArrayExpression: "first",
ObjectExpression: "first",
ImportDeclaration: "first"
}
],
"react/jsx-indent": ["error", 4],
"react/jsx-indent-props": ["error", 4],
"react/jsx-max-props-per-line": "off",
"react/jsx-one-expression-per-line": "off",
"react/jsx-props-no-multi-spaces": "off",
"react/jsx-tag-spacing": "off",
"react/jsx-wrap-multilines": "off",
"react/jsx-filename-extension": [1, { extensions: [".js", ".jsx"] }],
"prettier/prettier": [
"error",
{
singleQuote: true,
trailingComma: "all",
tabWidth: 4
}
]
},
settings: {
"import/resolver": {
node: {
paths: ["src"],
extensions: [".js", ".jsx", ".ts", ".tsx", ".native.js"]
}
}
}
};