-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.eslintrc.js
87 lines (87 loc) · 2.59 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
85
86
87
module.exports = {
"env": {
"browser": true,
"es6": true
},
"extends": ["eslint:recommended", "plugin:react/recommended"],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parser": "babel-eslint",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2018,
"sourceType": "module"
},
"plugins": [
"react"
],
"rules": {
"react/prop-types": 0,
"react/display-name": 0,
"no-mixed-spaces-and-tabs": 0,
indent: ["error", 4, {SwitchCase: 1}],
quotes: ["error", "single"],
"max-len": [
0,
{
code: 120,
tabWidth: 4,
ignoreComments: true,
ignoreUrls: true,
ignoreStrings: true
}
],
semi: ["error", "always", {omitLastInOneLineBlock: true}],
"semi-spacing": ["error", {before: false, after: true}],
"object-curly-spacing": ["error", "never"],
"lines-between-class-members": ["error", "always"],
"default-case": 0,
"space-infix-ops": ["error", {int32Hint: false}],
"comma-dangle": ["error", "never"],
"no-prototype-builtins": 0,
"guard-for-in": 0,
"no-console": ["error", {allow: ["warn", "error"]}],
"no-unused-vars": ["warn"],
curly: ["error"],
"padding-line-between-statements": [
"error",
{blankLine: "always", prev: ["const", "let", "var"], next: "*"},
{
blankLine: "any",
prev: ["const", "let", "var"],
next: ["const", "let", "var"]
},
{blankLine: "always", prev: ["import"], next: "*"},
{
blankLine: "any",
prev: ["import"],
next: ["import"]
},
{blankLine: "always", prev: "*", next: ["export"]},
{
blankLine: "any",
prev: ["export"],
next: ["export"]
}
],
"no-multiple-empty-lines": ["error", {max: 1, maxEOF: 1}],
"react/self-closing-comp": [
"error",
{
component: true,
html: true
}
],
"react/jsx-space-before-closing": ["error"],
"no-class-assign": 0,
"no-undef": 0,
"react/no-string-refs": 0,
"keyword-spacing": "error",
"space-before-blocks": "error",
"no-case-declarations": 0
}
};