-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc
164 lines (162 loc) · 4.33 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
{
"root": true,
"env": {
"browser": true,
"es6": true,
"node": true,
"amd": true
},
"globals": {
"describe": true,
"test": true,
"jest": true,
"CQ": true,
"sophus": true
},
"parserOptions": {
"ecmaFeatures": {
"experimentalObjectRestSpread": true,
"jsx": true
},
"sourceType": "module"
},
"extends": ["eslint:recommended", "airbnb-base", "plugin:react/recommended"],
"settings": {
"react": {
"version": "16.8.4"
}
},
"rules": {
"react/forbid-prop-types": [
"error",
{
"forbid": ["any"],
"checkContextTypes": true,
"checkChildContextTypes": true
}
],
"react/self-closing-comp": [
"error",
{
"component": true,
"html": true
}
],
"react/prefer-es6-class": "error",
"react/no-unknown-property": "error",
"react/no-redundant-should-component-update": "error",
"react/no-is-mounted": "error",
"react/no-deprecated": "error",
"react/no-array-index-key": 0,
"react/sort-comp": "error",
"react/no-typos": "error",
"react/no-direct-mutation-state": "error",
"react/jsx-no-undef": "error",
"react/jsx-no-duplicate-props": "error",
"react/jsx-no-comment-textnodes": "error",
"react/jsx-uses-react": "error",
"react/jsx-uses-vars": "error",
"react/jsx-indent": [2, "tab"],
"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/jsx-pascal-case": [
"error",
{
"allowAllCaps": true
}
],
"react/jsx-props-no-multi-spaces": "error",
// "react/jsx-indent-props": ["error", "tab"],
"react/jsx-boolean-value": "error",
// "react/jsx-sort-props": [
// "errors",
// {
// "callbacksLast": true,
// "shorthandFirst": true
// }
// ],
"react/jsx-first-prop-new-line": ["error", "multiline"],
"react/jsx-equals-spacing": ["error", "never"],
"react/jsx-curly-spacing": [
2,
{
"when": "always",
"spacing": {
"objectLiterals": "always",
"allowMultiline": true
}
}
],
"react/jsx-closing-bracket-location": [
"error",
{
"nonEmpty": false,
"selfClosing": "tag-aligned"
}
],
"react/jsx-filename-extension": [1, { "extensions": [".js"] }],
"react/jsx-tag-spacing": [
"error",
{
"closingSlash": "never",
"beforeSelfClosing": "always",
"afterOpening": "never",
"beforeClosing": "never"
}
],
"react/prop-types": "error",
"react/no-multi-comp": "error",
"react/no-unused-prop-types": "error",
"react/boolean-prop-naming": [
"error",
{ "rule": "^(is|has|show|hide)([A-Z]([A-Za-z0-9]?)+)?" }
],
"no-tabs": 0,
"linebreak-style": 0,
"indent": [
"error",
"tab",
{
"SwitchCase": 1
}
],
"quotes": ["error", "single"],
"semi": ["error", "always"],
"no-console": 0,
"comma-dangle": [
"error",
{
"arrays": "always-multiline",
"objects": "always-multiline",
"imports": "never",
"exports": "never",
"functions": "never"
}
],
"no-underscore-dangle": 0,
"class-methods-use-this": 0,
"one-var": 0,
"arrow-parens": ["error", "always"],
"quote-props": ["error", "as-needed"],
"consistent-return": 0,
"space-before-function-paren": 0,
"object-curly-spacing": ["error", "always"],
"array-callback-return": 0,
"max-len": 0,
"import/no-named-as-default": 0,
"import/no-named-as-default-member": 0,
"import/prefer-default-export": 0,
"import/no-extraneous-dependencies": ["error", {"devDependencies": true}],
"no-new-wrappers": 0
}
}