Skip to content

Commit 016142b

Browse files
committed
Fixes eslint config to support jsx components
1 parent 744d0da commit 016142b

File tree

3 files changed

+81
-69
lines changed

3 files changed

+81
-69
lines changed

client/.eslintrc.yml

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,12 @@
11
---
2-
parser: babel-eslint
2+
extends: react-app
33

44
env:
55
browser: true
66
es6: true
7-
jasmine: true
7+
jest: true
88
node: true
99

10-
ecmaFeatures:
11-
jsx: true
12-
13-
plugins:
14-
- react
15-
16-
extends:
17-
- airbnb-base
18-
1910
globals:
2011
context: false
2112
jest: true
22-
23-
rules:
24-
import/no-named-as-default: 0
25-
import/prefer-default-export: 0
26-
no-console: 0
27-
no-param-reassign: 0
28-
no-shadow: 0 # FIXME extract generic Edit component
29-
no-unused-vars: 0 # FIXME
30-
react/jsx-uses-react: 2

client/package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,11 @@
4848
"enzyme": "^2.7.1",
4949
"enzyme-to-json": "^1.5.0",
5050
"eslint": "^3.19.0",
51-
"eslint-config-airbnb": "^14.1.0",
52-
"eslint-plugin-import": "^2.2.0",
53-
"eslint-plugin-jsx-a11y": "^4.0.0",
54-
"eslint-plugin-react": "^6.10.3",
51+
"eslint-config-react-app": "^1.0.4",
52+
"eslint-plugin-flowtype": "^2.33.0",
53+
"eslint-plugin-import": "^2.3.0",
54+
"eslint-plugin-jsx-a11y": "^5.0.3",
55+
"eslint-plugin-react": "^7.0.1",
5556
"extract-text-webpack-plugin": "^2.1.0",
5657
"html-webpack-plugin": "^2.28.0",
5758
"jest": "^19.0.2",

client/yarn.lock

Lines changed: 74 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,9 @@ argparse@^1.0.7:
126126
dependencies:
127127
sprintf-js "~1.0.2"
128128

129-
aria-query@^0.3.0:
130-
version "0.3.0"
131-
resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-0.3.0.tgz#cb8a9984e2862711c83c80ade5b8f5ca0de2b467"
129+
aria-query@^0.5.0:
130+
version "0.5.0"
131+
resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-0.5.0.tgz#85e3152cd8cc5bab18dbed61cd9c4fce54fa79c3"
132132
dependencies:
133133
ast-types-flow "0.0.7"
134134

@@ -154,6 +154,13 @@ array-flatten@1.1.1:
154154
version "1.1.1"
155155
resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2"
156156

157+
array-includes@^3.0.3:
158+
version "3.0.3"
159+
resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.0.3.tgz#184b48f62d92d7452bb31b323165c7f8bd02266d"
160+
dependencies:
161+
define-properties "^1.1.2"
162+
es-abstract "^1.7.0"
163+
157164
array-union@^1.0.1:
158165
version "1.0.2"
159166
resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39"
@@ -168,13 +175,6 @@ array-unique@^0.2.1:
168175
version "0.2.1"
169176
resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53"
170177

171-
array.prototype.find@^2.0.1:
172-
version "2.0.4"
173-
resolved "https://registry.yarnpkg.com/array.prototype.find/-/array.prototype.find-2.0.4.tgz#556a5c5362c08648323ddaeb9de9d14bc1864c90"
174-
dependencies:
175-
define-properties "^1.1.2"
176-
es-abstract "^1.7.0"
177-
178178
arrify@^1.0.0, arrify@^1.0.1:
179179
version "1.0.1"
180180
resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d"
@@ -260,6 +260,12 @@ axios@^0.16.1:
260260
dependencies:
261261
follow-redirects "^1.2.3"
262262

263+
axobject-query@^0.1.0:
264+
version "0.1.0"
265+
resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-0.1.0.tgz#62f59dbc59c9f9242759ca349960e7a2fe3c36c0"
266+
dependencies:
267+
ast-types-flow "0.0.7"
268+
263269
babel-code-frame@^6.11.0, babel-code-frame@^6.16.0, babel-code-frame@^6.22.0:
264270
version "6.22.0"
265271
resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.22.0.tgz#027620bee567a88c32561574e7fd0801d33118e4"
@@ -1819,7 +1825,7 @@ diffie-hellman@^5.0.0:
18191825
miller-rabin "^4.0.0"
18201826
randombytes "^2.0.0"
18211827

1822-
doctrine@1.5.0, doctrine@^1.2.2:
1828+
doctrine@1.5.0:
18231829
version "1.5.0"
18241830
resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa"
18251831
dependencies:
@@ -2084,15 +2090,9 @@ escope@^3.6.0:
20842090
esrecurse "^4.1.0"
20852091
estraverse "^4.1.1"
20862092

2087-
eslint-config-airbnb-base@^11.1.0:
2088-
version "11.1.3"
2089-
resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-11.1.3.tgz#0e8db71514fa36b977fbcf977c01edcf863e0cf0"
2090-
2091-
eslint-config-airbnb@^14.1.0:
2092-
version "14.1.0"
2093-
resolved "https://registry.yarnpkg.com/eslint-config-airbnb/-/eslint-config-airbnb-14.1.0.tgz#355d290040bbf8e00bf8b4b19f4b70cbe7c2317f"
2094-
dependencies:
2095-
eslint-config-airbnb-base "^11.1.0"
2093+
eslint-config-react-app@^1.0.4:
2094+
version "1.0.4"
2095+
resolved "https://registry.yarnpkg.com/eslint-config-react-app/-/eslint-config-react-app-1.0.4.tgz#c0178f535a922236c53daafea4f397203db7d9af"
20962096

20972097
eslint-import-resolver-node@^0.2.0:
20982098
version "0.2.3"
@@ -2109,9 +2109,15 @@ eslint-module-utils@^2.0.0:
21092109
debug "2.2.0"
21102110
pkg-dir "^1.0.0"
21112111

2112-
eslint-plugin-import@^2.2.0:
2113-
version "2.2.0"
2114-
resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.2.0.tgz#72ba306fad305d67c4816348a4699a4229ac8b4e"
2112+
eslint-plugin-flowtype@^2.33.0:
2113+
version "2.33.0"
2114+
resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-2.33.0.tgz#b2783814ed2ddcf729953b8f65ff73c90cabee4b"
2115+
dependencies:
2116+
lodash "^4.15.0"
2117+
2118+
eslint-plugin-import@^2.3.0:
2119+
version "2.3.0"
2120+
resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.3.0.tgz#37c801e0ada0e296cbdf20c3f393acb5b52af36b"
21152121
dependencies:
21162122
builtin-modules "^1.1.1"
21172123
contains-path "^0.1.0"
@@ -2122,28 +2128,27 @@ eslint-plugin-import@^2.2.0:
21222128
has "^1.0.1"
21232129
lodash.cond "^4.3.0"
21242130
minimatch "^3.0.3"
2125-
pkg-up "^1.0.0"
2131+
read-pkg-up "^2.0.0"
21262132

2127-
eslint-plugin-jsx-a11y@^4.0.0:
2128-
version "4.0.0"
2129-
resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-4.0.0.tgz#779bb0fe7b08da564a422624911de10061e048ee"
2133+
eslint-plugin-jsx-a11y@^5.0.3:
2134+
version "5.0.3"
2135+
resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-5.0.3.tgz#4a939f76ec125010528823331bf948cc573380b6"
21302136
dependencies:
2131-
aria-query "^0.3.0"
2137+
aria-query "^0.5.0"
2138+
array-includes "^3.0.3"
21322139
ast-types-flow "0.0.7"
2140+
axobject-query "^0.1.0"
21332141
damerau-levenshtein "^1.0.0"
21342142
emoji-regex "^6.1.0"
2135-
jsx-ast-utils "^1.0.0"
2136-
object-assign "^4.0.1"
2143+
jsx-ast-utils "^1.4.0"
21372144

2138-
eslint-plugin-react@^6.10.3:
2139-
version "6.10.3"
2140-
resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-6.10.3.tgz#c5435beb06774e12c7db2f6abaddcbf900cd3f78"
2145+
eslint-plugin-react@^7.0.1:
2146+
version "7.0.1"
2147+
resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.0.1.tgz#e78107e1e559c6e2b17786bb67c2e2a010ad0d2f"
21412148
dependencies:
2142-
array.prototype.find "^2.0.1"
2143-
doctrine "^1.2.2"
2149+
doctrine "^2.0.0"
21442150
has "^1.0.1"
21452151
jsx-ast-utils "^1.3.4"
2146-
object.assign "^4.0.4"
21472152

21482153
eslint@^3.19.0:
21492154
version "3.19.0"
@@ -2444,7 +2449,7 @@ find-up@^1.0.0:
24442449
path-exists "^2.0.0"
24452450
pinkie-promise "^2.0.0"
24462451

2447-
find-up@^2.1.0:
2452+
find-up@^2.0.0, find-up@^2.1.0:
24482453
version "2.1.0"
24492454
resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7"
24502455
dependencies:
@@ -3592,7 +3597,7 @@ jsprim@^1.2.2:
35923597
json-schema "0.2.3"
35933598
verror "1.3.6"
35943599

3595-
jsx-ast-utils@^1.0.0, jsx-ast-utils@^1.3.4:
3600+
jsx-ast-utils@^1.3.4, jsx-ast-utils@^1.4.0:
35963601
version "1.4.1"
35973602
resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-1.4.1.tgz#3867213e8dd79bf1e8f2300c0cfc1efb182c0df1"
35983603

@@ -3649,6 +3654,15 @@ load-json-file@^1.0.0:
36493654
pinkie-promise "^2.0.0"
36503655
strip-bom "^2.0.0"
36513656

3657+
load-json-file@^2.0.0:
3658+
version "2.0.0"
3659+
resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8"
3660+
dependencies:
3661+
graceful-fs "^4.1.2"
3662+
parse-json "^2.2.0"
3663+
pify "^2.0.0"
3664+
strip-bom "^3.0.0"
3665+
36523666
loader-runner@^2.3.0:
36533667
version "2.3.0"
36543668
resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.3.0.tgz#f482aea82d543e07921700d5a46ef26fdac6b8a2"
@@ -3797,7 +3811,7 @@ lodash.uniq@^4.5.0:
37973811
version "4.5.0"
37983812
resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773"
37993813

3800-
lodash@^4.0.0, lodash@^4.14.0, lodash@^4.16.3, lodash@^4.17.2, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.2.0, lodash@^4.2.1, lodash@^4.3.0:
3814+
lodash@^4.0.0, lodash@^4.14.0, lodash@^4.15.0, lodash@^4.16.3, lodash@^4.17.2, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.2.0, lodash@^4.2.1, lodash@^4.3.0:
38013815
version "4.17.4"
38023816
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae"
38033817

@@ -4414,6 +4428,12 @@ path-type@^1.0.0:
44144428
pify "^2.0.0"
44154429
pinkie-promise "^2.0.0"
44164430

4431+
path-type@^2.0.0:
4432+
version "2.0.0"
4433+
resolved "https://registry.yarnpkg.com/path-type/-/path-type-2.0.0.tgz#f012ccb8415b7096fc2daa1054c3d72389594c73"
4434+
dependencies:
4435+
pify "^2.0.0"
4436+
44174437
pbkdf2@^3.0.3:
44184438
version "3.0.9"
44194439
resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.9.tgz#f2c4b25a600058b3c3773c086c37dbbee1ffe693"
@@ -4444,12 +4464,6 @@ pkg-dir@^1.0.0:
44444464
dependencies:
44454465
find-up "^1.0.0"
44464466

4447-
pkg-up@^1.0.0:
4448-
version "1.0.0"
4449-
resolved "https://registry.yarnpkg.com/pkg-up/-/pkg-up-1.0.0.tgz#3e08fb461525c4421624a33b9f7e6d0af5b05a26"
4450-
dependencies:
4451-
find-up "^1.0.0"
4452-
44534467
pluralize@^1.2.1:
44544468
version "1.2.1"
44554469
resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-1.2.1.tgz#d1a21483fd22bb41e58a12fa3421823140897c45"
@@ -4936,6 +4950,13 @@ read-pkg-up@^1.0.1:
49364950
find-up "^1.0.0"
49374951
read-pkg "^1.0.0"
49384952

4953+
read-pkg-up@^2.0.0:
4954+
version "2.0.0"
4955+
resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-2.0.0.tgz#6b72a8048984e0c41e79510fd5e9fa99b3b549be"
4956+
dependencies:
4957+
find-up "^2.0.0"
4958+
read-pkg "^2.0.0"
4959+
49394960
read-pkg@^1.0.0:
49404961
version "1.1.0"
49414962
resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28"
@@ -4944,6 +4965,14 @@ read-pkg@^1.0.0:
49444965
normalize-package-data "^2.3.2"
49454966
path-type "^1.0.0"
49464967

4968+
read-pkg@^2.0.0:
4969+
version "2.0.0"
4970+
resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-2.0.0.tgz#8ef1c0623c6a6db0dc6713c4bfac46332b2368f8"
4971+
dependencies:
4972+
load-json-file "^2.0.0"
4973+
normalize-package-data "^2.3.2"
4974+
path-type "^2.0.0"
4975+
49474976
readable-stream@1.0:
49484977
version "1.0.34"
49494978
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c"

0 commit comments

Comments
 (0)