Skip to content

Commit 7a95862

Browse files
committed
Add more eslint-plugin-react rules
1 parent becbdf3 commit 7a95862

File tree

4 files changed

+30
-82
lines changed

4 files changed

+30
-82
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ eslint-config-prettier has been tested with:
449449
- ESLint 4.12.0 (eslint-config-prettier 2.1.1 and older were tested with ESLint 3.x)
450450
- prettier 1.8.2
451451
- eslint-plugin-flowtype 2.39.1
452-
- eslint-plugin-react 7.5.1
452+
- eslint-plugin-react 7.10.0
453453
- eslint-plugin-standard 3.0.1
454454

455455
Have new rules been added since those versions? Have we missed any rules? Is

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"eslint-config-google": "^0.9.1",
4141
"eslint-plugin-flowtype": "^2.39.1",
4242
"eslint-plugin-prettier": "^2.3.1",
43-
"eslint-plugin-react": "^7.5.1",
43+
"eslint-plugin-react": "^7.10.0",
4444
"eslint-plugin-standard": "^3.0.1",
4545
"prettier": "^1.8.2",
4646
"rimraf": "^2.6.2"

react.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
module.exports = {
44
rules: {
5+
"react/jsx-child-element-spacing": "off",
56
"react/jsx-closing-bracket-location": "off",
67
"react/jsx-closing-tag-location": "off",
78
"react/jsx-curly-spacing": "off",
@@ -11,6 +12,7 @@ module.exports = {
1112
"react/jsx-indent-props": "off",
1213
"react/jsx-max-props-per-line": "off",
1314
"react/jsx-one-expression-per-line": "off",
15+
"react/jsx-props-no-multi-spaces": "off",
1416
"react/jsx-space-before-closing": "off",
1517
"react/jsx-tag-spacing": "off",
1618
"react/jsx-wrap-multilines": "off"

yarn.lock

Lines changed: 26 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,6 @@ arrify@^1.0.0, arrify@^1.0.1:
185185
version "1.0.1"
186186
resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d"
187187

188-
asap@~2.0.3:
189-
version "2.0.6"
190-
resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46"
191-
192188
asn1@~0.2.3:
193189
version "0.2.3"
194190
resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86"
@@ -918,10 +914,6 @@ core-assert@^0.2.0:
918914
buf-compare "^1.0.0"
919915
is-error "^2.2.0"
920916

921-
core-js@^1.0.0:
922-
version "1.2.7"
923-
resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636"
924-
925917
core-js@^2.0.0, core-js@^2.4.0, core-js@^2.5.0:
926918
version "2.5.1"
927919
resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.1.tgz#ae6874dc66937789b80754ff5428df66819ca50b"
@@ -1045,19 +1037,18 @@ detect-indent@^5.0.0:
10451037
version "5.0.0"
10461038
resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-5.0.0.tgz#3871cc0a6a002e8c3e5b3cf7f336264675f06b9d"
10471039

1048-
doctrine@^2.0.0:
1049-
version "2.0.0"
1050-
resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.0.0.tgz#c73d8d2909d22291e1a007a395804da8b665fe63"
1051-
dependencies:
1052-
esutils "^2.0.2"
1053-
isarray "^1.0.0"
1054-
10551040
doctrine@^2.0.2:
10561041
version "2.0.2"
10571042
resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.0.2.tgz#68f96ce8efc56cc42651f1faadb4f175273b0075"
10581043
dependencies:
10591044
esutils "^2.0.2"
10601045

1046+
doctrine@^2.1.0:
1047+
version "2.1.0"
1048+
resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d"
1049+
dependencies:
1050+
esutils "^2.0.2"
1051+
10611052
dot-prop@^4.1.0:
10621053
version "4.2.0"
10631054
resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-4.2.0.tgz#1f19e0c2e1aa0e32797c49799f2837ac6af69c57"
@@ -1081,12 +1072,6 @@ empower-core@^0.6.1:
10811072
call-signature "0.0.2"
10821073
core-js "^2.0.0"
10831074

1084-
encoding@^0.1.11:
1085-
version "0.1.12"
1086-
resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.12.tgz#538b66f3ee62cd1ab51ec323829d1f9480c74beb"
1087-
dependencies:
1088-
iconv-lite "~0.4.13"
1089-
10901075
equal-length@^1.0.0:
10911076
version "1.0.1"
10921077
resolved "https://registry.yarnpkg.com/equal-length/-/equal-length-1.0.1.tgz#21ca112d48ab24b4e1e7ffc0e5339d31fdfc274c"
@@ -1140,14 +1125,14 @@ eslint-plugin-prettier@^2.3.1:
11401125
fast-diff "^1.1.1"
11411126
jest-docblock "^21.0.0"
11421127

1143-
eslint-plugin-react@^7.5.1:
1144-
version "7.5.1"
1145-
resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.5.1.tgz#52e56e8d80c810de158859ef07b880d2f56ee30b"
1128+
eslint-plugin-react@^7.10.0:
1129+
version "7.10.0"
1130+
resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.10.0.tgz#af5c1fef31c4704db02098f9be18202993828b50"
11461131
dependencies:
1147-
doctrine "^2.0.0"
1148-
has "^1.0.1"
1149-
jsx-ast-utils "^2.0.0"
1150-
prop-types "^15.6.0"
1132+
doctrine "^2.1.0"
1133+
has "^1.0.3"
1134+
jsx-ast-utils "^2.0.1"
1135+
prop-types "^15.6.2"
11511136

11521137
eslint-plugin-standard@^3.0.1:
11531138
version "3.0.1"
@@ -1311,18 +1296,6 @@ fast-levenshtein@~2.0.4:
13111296
version "2.0.6"
13121297
resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917"
13131298

1314-
fbjs@^0.8.16:
1315-
version "0.8.16"
1316-
resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.16.tgz#5e67432f550dc41b572bf55847b8aca64e5337db"
1317-
dependencies:
1318-
core-js "^1.0.0"
1319-
isomorphic-fetch "^2.1.1"
1320-
loose-envify "^1.0.0"
1321-
object-assign "^4.1.0"
1322-
promise "^7.1.1"
1323-
setimmediate "^1.0.5"
1324-
ua-parser-js "^0.7.9"
1325-
13261299
figures@^2.0.0:
13271300
version "2.0.0"
13281301
resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962"
@@ -1603,6 +1576,12 @@ has@^1.0.1:
16031576
dependencies:
16041577
function-bind "^1.0.2"
16051578

1579+
has@^1.0.3:
1580+
version "1.0.3"
1581+
resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796"
1582+
dependencies:
1583+
function-bind "^1.1.1"
1584+
16061585
hawk@~3.1.3:
16071586
version "3.1.3"
16081587
resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4"
@@ -1654,7 +1633,7 @@ hullabaloo-config-manager@^1.1.0:
16541633
resolve-from "^3.0.0"
16551634
safe-buffer "^5.0.1"
16561635

1657-
iconv-lite@^0.4.17, iconv-lite@~0.4.13:
1636+
iconv-lite@^0.4.17:
16581637
version "0.4.18"
16591638
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.18.tgz#23d8656b16aae6742ac29732ea8f0336a4789cf2"
16601639

@@ -1902,7 +1881,7 @@ is-retry-allowed@^1.0.0:
19021881
version "1.1.0"
19031882
resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz#11a060568b67339444033d0125a61a20d564fb34"
19041883

1905-
is-stream@^1.0.0, is-stream@^1.0.1, is-stream@^1.1.0:
1884+
is-stream@^1.0.0, is-stream@^1.1.0:
19061885
version "1.1.0"
19071886
resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44"
19081887

@@ -1922,7 +1901,7 @@ is-utf8@^0.2.0, is-utf8@^0.2.1:
19221901
version "0.2.1"
19231902
resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72"
19241903

1925-
[email protected], isarray@^1.0.0, isarray@~1.0.0:
1904+
[email protected], isarray@~1.0.0:
19261905
version "1.0.0"
19271906
resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
19281907

@@ -1936,13 +1915,6 @@ isobject@^2.0.0:
19361915
dependencies:
19371916
isarray "1.0.0"
19381917

1939-
isomorphic-fetch@^2.1.1:
1940-
version "2.2.1"
1941-
resolved "https://registry.yarnpkg.com/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz#611ae1acf14f5e81f729507472819fe9733558a9"
1942-
dependencies:
1943-
node-fetch "^1.0.1"
1944-
whatwg-fetch ">=0.10.0"
1945-
19461918
isstream@~0.1.2:
19471919
version "0.1.2"
19481920
resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a"
@@ -2021,7 +1993,7 @@ jsprim@^1.2.2:
20211993
json-schema "0.2.3"
20221994
verror "1.10.0"
20231995

2024-
jsx-ast-utils@^2.0.0:
1996+
jsx-ast-utils@^2.0.1:
20251997
version "2.0.1"
20261998
resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-2.0.1.tgz#e801b1b39985e20fffc87b40e3748080e2dcac7f"
20271999
dependencies:
@@ -2268,13 +2240,6 @@ natural-compare@^1.4.0:
22682240
version "1.4.0"
22692241
resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
22702242

2271-
node-fetch@^1.0.1:
2272-
version "1.7.2"
2273-
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.2.tgz#c54e9aac57e432875233525f3c891c4159ffefd7"
2274-
dependencies:
2275-
encoding "^0.1.11"
2276-
is-stream "^1.0.1"
2277-
22782243
node-pre-gyp@^0.6.36:
22792244
version "0.6.36"
22802245
resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.6.36.tgz#db604112cb74e0d477554e9b505b17abddfab786"
@@ -2587,17 +2552,10 @@ progress@^2.0.0:
25872552
version "2.0.0"
25882553
resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.0.tgz#8a1be366bf8fc23db2bd23f10c6fe920b4389d1f"
25892554

2590-
promise@^7.1.1:
2591-
version "7.3.1"
2592-
resolved "https://registry.yarnpkg.com/promise/-/promise-7.3.1.tgz#064b72602b18f90f29192b8b1bc418ffd1ebd3bf"
2593-
dependencies:
2594-
asap "~2.0.3"
2595-
2596-
prop-types@^15.6.0:
2597-
version "15.6.0"
2598-
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.6.0.tgz#ceaf083022fc46b4a35f69e13ef75aed0d639856"
2555+
prop-types@^15.6.2:
2556+
version "15.6.2"
2557+
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.6.2.tgz#05d5ca77b4453e985d60fc7ff8c859094a497102"
25992558
dependencies:
2600-
fbjs "^0.8.16"
26012559
loose-envify "^1.3.1"
26022560
object-assign "^4.1.1"
26032561

@@ -2865,10 +2823,6 @@ set-immediate-shim@^1.0.1:
28652823
version "1.0.1"
28662824
resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61"
28672825

2868-
setimmediate@^1.0.5:
2869-
version "1.0.5"
2870-
resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285"
2871-
28722826
shebang-command@^1.2.0:
28732827
version "1.2.0"
28742828
resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea"
@@ -3176,10 +3130,6 @@ typedarray@^0.0.6:
31763130
version "0.0.6"
31773131
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
31783132

3179-
ua-parser-js@^0.7.9:
3180-
version "0.7.14"
3181-
resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.14.tgz#110d53fa4c3f326c121292bbeac904d2e03387ca"
3182-
31833133
uid-number@^0.0.6:
31843134
version "0.0.6"
31853135
resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81"
@@ -3253,10 +3203,6 @@ well-known-symbols@^1.0.0:
32533203
version "1.0.0"
32543204
resolved "https://registry.yarnpkg.com/well-known-symbols/-/well-known-symbols-1.0.0.tgz#73c78ae81a7726a8fa598e2880801c8b16225518"
32553205

3256-
whatwg-fetch@>=0.10.0:
3257-
version "2.0.3"
3258-
resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.3.tgz#9c84ec2dcf68187ff00bc64e1274b442176e1c84"
3259-
32603206
which@^1.2.9:
32613207
version "1.3.0"
32623208
resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a"

0 commit comments

Comments
 (0)