Skip to content

Commit 5e9bfe4

Browse files
committed
Upgrade to support latest React
1 parent 2e587f8 commit 5e9bfe4

10 files changed

Lines changed: 434 additions & 323 deletions

File tree

.babelrc

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
{
2-
"stage": 2,
3-
"loose": ["es6.modules", "es6.classes"],
2+
"presets": [
3+
"es2015",
4+
"react",
5+
"stage-1"
6+
],
7+
"plugins": [
8+
"transform-remove-console"
9+
],
410
"ignore": [
511
"build"
612
]

.eslintrc

Lines changed: 280 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,13 @@
11
{
2-
"parser": "babel-eslint",
3-
"env": {
4-
"browser": true,
5-
"node": true,
6-
"es6": true
7-
},
8-
9-
"rules": {
10-
"no-mixed-requires": [0, false],
11-
"strict": [1, "never"],
12-
"curly": 1,
13-
"no-bitwise": 1,
14-
"max-len": [1, 110, 4],
15-
"vars-on-top": 0,
16-
"guard-for-in": 1,
17-
"no-underscore-dangle": 0,
18-
"no-undef": 2,
19-
20-
"react/display-name": 1,
21-
"react/jsx-quotes": [2, "double", "avoid-escape"],
22-
"react/jsx-no-undef": 2,
23-
"react/jsx-sort-props": 0,
24-
"react/jsx-uses-react": 1,
25-
"react/jsx-uses-vars": 1,
26-
"react/no-did-mount-set-state": 2,
27-
"react/no-did-update-set-state": 2,
28-
"react/no-multi-comp": 0,
29-
"react/no-unknown-property": 1,
30-
"react/prop-types": 2,
31-
"react/react-in-jsx-scope": 1,
32-
"react/self-closing-comp": 1,
33-
"react/wrap-multilines": 2,
34-
35-
"babel/object-shorthand": 1,
36-
37-
"no-loop-func": 2,
38-
"no-multi-spaces": 1,
39-
40-
"comma-dangle": [1, "never"],
41-
"indent": [2, 4],
42-
"quotes": [2, "single"],
43-
"semi": [2, "always"],
44-
"semi-spacing": [2, {"before": false, "after": false}],
45-
46-
"brace-style": [2, "1tbs", { "allowSingleLine": true }],
47-
"key-spacing": [2,
48-
{
49-
"beforeColon": false,
50-
"afterColon": true
51-
}
52-
],
53-
54-
"new-cap": [1, {"newIsCap": true}],
55-
56-
"space-after-keywords": [1, "always"],
57-
"space-before-blocks": [1, "always"],
58-
"space-in-parens": [1, "never"],
59-
"space-before-function-paren": [1, "never"],
60-
"space-infix-ops": [2, {"int32Hint": false}],
61-
"space-return-throw-case": 2,
62-
"max-nested-callbacks": [2, 3],
63-
"one-var": [0, "always"],
64-
65-
"eol-last": 2
66-
},
67-
68-
"ecmaFeatures": {
69-
"jsx": true,
2+
"parser": "babel-eslint",
3+
"env": {
4+
"browser": true,
5+
"node": true
6+
},
7+
"parserOptions": {
8+
"ecmaVersion": 6,
9+
"sourceType": "module",
10+
"ecmaFeatures": {
7011
"arrowFunctions": true,
7112
"binaryLiterals": true,
7213
"blockBindings": true,
@@ -81,18 +22,281 @@
8122
"objectLiteralShorthandMethods": true,
8223
"objectLiteralShorthandProperties": true,
8324
"octalLiterals": true,
84-
"regexUFlag": true,
85-
"regexYFlag": true,
25+
"regexUFlag": false,
26+
"regexYFlag": false,
8627
"restParams": true,
8728
"spread": true,
8829
"superInFunctions": true,
8930
"templateStrings": true,
9031
"unicodeCodePointEscapes": true,
91-
"globalReturn": true
92-
},
32+
"globalReturn": true,
33+
"jsx": true,
34+
"experimentalObjectRestSpread": true
35+
}
36+
},
37+
"rules": {
38+
"no-mixed-requires": [
39+
0,
40+
false
41+
],
42+
"strict": [
43+
1,
44+
"never"
45+
],
46+
"no-undef": 2,
47+
"no-delete-var": 2,
48+
"no-shadow": 2,
49+
"no-shadow-restricted-names": 2,
50+
"no-unused-vars": [
51+
2,
52+
{
53+
"vars": "all",
54+
"args": "after-used"
55+
}
56+
],
57+
"no-undefined": 2,
58+
"no-use-before-define": 2,
59+
"no-unneeded-ternary": 1,
60+
"no-obj-calls": 2,
61+
"no-negated-in-lhs": 2,
62+
"no-inner-declarations": 2,
63+
"curly": 1,
64+
"camelcase": 2,
65+
"max-len": [
66+
1,
67+
100,
68+
4,
69+
{
70+
"ignoreComments": true,
71+
"ignoreUrls": true,
72+
"ignorePattern": "^\\s*import\\s+"
73+
}
74+
],
75+
"padded-blocks": [
76+
0,
77+
"always"
78+
],
79+
"no-invalid-regexp": 2,
80+
"vars-on-top": 0,
81+
"guard-for-in": 1,
82+
"no-underscore-dangle": 0,
83+
"no-func-assign": 2,
84+
"no-extra-parens": 0,
85+
"no-loop-func": 1,
86+
"no-multi-spaces": 1,
87+
"comma-dangle": [
88+
1,
89+
"never"
90+
],
91+
"indent": [
92+
2,
93+
4,
94+
{
95+
"SwitchCase": 1,
96+
"VariableDeclarator": 1
97+
}
98+
],
99+
"quotes": [
100+
2,
101+
"single"
102+
],
103+
"semi": [
104+
2,
105+
"always"
106+
],
107+
"semi-spacing": [
108+
2,
109+
{
110+
"before": false,
111+
"after": true
112+
}
113+
],
114+
"brace-style": [
115+
2,
116+
"1tbs",
117+
{
118+
"allowSingleLine": true
119+
}
120+
],
121+
"key-spacing": [
122+
2,
123+
{
124+
"beforeColon": false,
125+
"afterColon": true
126+
}
127+
],
128+
"new-cap": [
129+
2,
130+
{
131+
"newIsCap": true,
132+
"capIsNew": true,
133+
"capIsNewExceptions": [
134+
"Immutable",
135+
"Set"
136+
]
137+
}
138+
],
139+
"keyword-spacing": [
140+
2,
141+
{
142+
"before": true,
143+
"after": true
144+
}
145+
],
146+
"space-before-blocks": [
147+
1,
148+
"always"
149+
],
150+
"array-bracket-spacing": [
151+
2,
152+
"never"
153+
],
154+
"object-curly-spacing": [
155+
2,
156+
"never",
157+
{
158+
"objectsInObjects": false,
159+
"arraysInObjects": false
160+
}
161+
],
162+
"computed-property-spacing": [
163+
1,
164+
"never"
165+
],
166+
"space-in-parens": [
167+
1,
168+
"never"
169+
],
170+
"space-before-function-paren": [
171+
1,
172+
"never"
173+
],
174+
"space-infix-ops": [
175+
2,
176+
{
177+
"int32Hint": false
178+
}
179+
],
180+
"max-nested-callbacks": [
181+
2,
182+
3
183+
],
184+
"one-var": [
185+
0,
186+
"always"
187+
],
188+
"eqeqeq": [
189+
2,
190+
"smart"
191+
],
192+
"accessor-pairs": [
193+
1,
194+
{
195+
"getWithoutSet": true
196+
}
197+
],
198+
"no-cond-assign": [
199+
2,
200+
"except-parens"
201+
],
202+
"valid-typeof": 1,
203+
"no-div-regex": 2,
204+
"no-control-regex": 2,
205+
"no-caller": 2,
206+
"no-alert": 2,
207+
"no-with": 2,
208+
"no-duplicate-case": 2,
209+
"no-dupe-args": 2,
210+
"no-dupe-keys": 2,
211+
"no-unreachable": 2,
212+
"use-isnan": 2,
213+
"no-redeclare": [
214+
2,
215+
{
216+
"builtinGlobals": true
217+
}
218+
],
219+
"no-useless-call": 2,
220+
"no-void": 2,
221+
"no-new-wrappers": 2,
222+
"no-new-require": 2,
223+
"no-path-concat": 2,
224+
"no-lonely-if": 1,
225+
"no-array-constructor": 1,
226+
"no-unexpected-multiline": 2,
227+
"linebreak-style": [
228+
2,
229+
"unix"
230+
],
231+
"no-trailing-spaces": [
232+
1,
233+
{
234+
"skipBlankLines": false
235+
}
236+
],
237+
"eol-last": 2,
238+
"prefer-spread": 1,
239+
"no-this-before-super": 2,
240+
"constructor-super": 2,
241+
"prefer-const": 1,
242+
"no-bitwise": 1,
243+
"babel/generator-star-spacing": 1,
244+
"babel/new-cap": 0,
245+
"babel/object-curly-spacing": 1,
246+
"babel/object-shorthand": 1,
247+
"babel/arrow-parens": 0,
93248

94-
"plugins": [
95-
"babel",
96-
"react"
97-
]
249+
"react/display-name": 1,
250+
"react/forbid-prop-types": 0,
251+
"react/jsx-boolean-value": 1,
252+
"react/jsx-closing-bracket-location": [
253+
1,
254+
{
255+
"selfClosing": "after-props",
256+
"nonEmpty": "after-props"
257+
}
258+
],
259+
"react/jsx-curly-spacing": 1,
260+
"react/jsx-indent-props": 1,
261+
"react/jsx-max-props-per-line": [
262+
1,
263+
{
264+
"maximum": 3
265+
}
266+
],
267+
"react/jsx-no-duplicate-props": 2,
268+
"react/jsx-no-literals": 1,
269+
"react/jsx-no-undef": 2,
270+
"jsx-quotes": [
271+
1,
272+
"prefer-double"
273+
],
274+
"react/jsx-sort-prop-types": 1,
275+
"react/jsx-sort-props": [
276+
0,
277+
{
278+
"callbacksLast": true
279+
}
280+
],
281+
"react/jsx-uses-react": 1,
282+
"react/jsx-uses-vars": 1,
283+
"react/no-danger": 1,
284+
"react/jsx-pascal-case": 1,
285+
"react/no-did-mount-set-state": 2,
286+
"react/no-did-update-set-state": 2,
287+
"react/no-direct-mutation-state": 2,
288+
"react/no-multi-comp": 0,
289+
"react/no-set-state": 0,
290+
"react/no-unknown-property": 2,
291+
"react/prop-types": 2,
292+
"react/react-in-jsx-scope": 2,
293+
"react/require-extension": 0,
294+
"react/self-closing-comp": 1,
295+
"react/sort-comp": 1,
296+
"react/wrap-multilines": 1
297+
},
298+
"plugins": [
299+
"babel",
300+
"react"
301+
]
98302
}

0 commit comments

Comments
 (0)