-
Notifications
You must be signed in to change notification settings - Fork 6
/
.eslintrc.json
65 lines (65 loc) · 1.62 KB
/
.eslintrc.json
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
{
"env": {
"browser": true,
"node": true,
"commonjs": true,
"es2021": true
},
"extends": [
"react-app",
"plugin:prettier/recommended",
"eslint:recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:react/jsx-runtime"
],
"rules": {
"prettier/prettier": [
"error",
{
"endOfLine": "auto",
"arrowParens": "avoid"
}
],
"import/no-anonymous-default-export": "off",
"indent": ["error", 2, { "SwitchCase": 1 }],
"no-var": "error",
"no-unused-vars": "warn",
"semi": "error",
"prefer-const": "error",
"no-new-object": "error",
"array-bracket-newline": ["error", "consistent"],
"array-element-newline": ["error", "consistent"],
"object-property-newline": [
"error",
{ "allowAllPropertiesOnSameLine": false }
],
"object-shorthand": ["error", "always"],
"lines-between-class-members": ["error", "always"],
"no-new-func": "error",
"prefer-arrow-callback": "error",
"implicit-arrow-linebreak": ["error", "beside"],
"prefer-destructuring": ["error", { "object": true, "array": false }],
"prefer-template": "error",
"brace-style": "error",
"curly": "error",
"keyword-spacing": [
"error",
{
"before": true,
"after": true
}
],
"no-fallthrough": ["error"],
"default-case": ["error", { "commentPattern": "^no\\sdefault" }],
"eqeqeq": ["error", "always"],
"newline-before-return": "error",
"react/self-closing-comp": [
"error",
{
"component": true,
"html": true
}
]
}
}