Skip to content

Commit 22adc06

Browse files
kripodljharb
andcommitted
[eslint config] [minor] Allow using eslint-plugin-react-hooks v3 and v4
Co-authored-by: Kristóf Poduszló <[email protected]> Co-authored-by: Jordan Harband <[email protected]>
1 parent fe2e451 commit 22adc06

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

.travis.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,13 @@ env:
1818
matrix:
1919
- 'TEST=true ESLINT=6 PACKAGE=eslint-config-airbnb-base'
2020
- 'TEST=true ESLINT=6 PACKAGE=eslint-config-airbnb'
21+
- 'TEST=true ESLINT=6 REACT_HOOKS=3 PACKAGE=eslint-config-airbnb'
22+
- 'TEST=true ESLINT=6 REACT_HOOKS=2.3 PACKAGE=eslint-config-airbnb'
2123
- 'TEST=true ESLINT=6 REACT_HOOKS=1.7 PACKAGE=eslint-config-airbnb'
2224
- 'TEST=true ESLINT=5 PACKAGE=eslint-config-airbnb-base'
2325
- 'TEST=true ESLINT=5 PACKAGE=eslint-config-airbnb'
26+
- 'TEST=true ESLINT=5 REACT_HOOKS=3 PACKAGE=eslint-config-airbnb'
27+
- 'TEST=true ESLINT=5 REACT_HOOKS=2.3 PACKAGE=eslint-config-airbnb'
2428
- 'TEST=true ESLINT=5 REACT_HOOKS=1.7 PACKAGE=eslint-config-airbnb'
2529
matrix:
2630
fast_finish: true
@@ -29,12 +33,20 @@ matrix:
2933
env: PREPUBLISH=true ESLINT=6 PACKAGE=eslint-config-airbnb-base
3034
- node_js: "lts/*"
3135
env: PREPUBLISH=true ESLINT=6 PACKAGE=eslint-config-airbnb
36+
- node_js: "lts/*"
37+
env: PREPUBLISH=true ESLINT=6 REACT_HOOKS=3 PACKAGE=eslint-config-airbnb
38+
- node_js: "lts/*"
39+
env: PREPUBLISH=true ESLINT=6 REACT_HOOKS=2.3 PACKAGE=eslint-config-airbnb
3240
- node_js: "lts/*"
3341
env: PREPUBLISH=true ESLINT=6 REACT_HOOKS=1.7 PACKAGE=eslint-config-airbnb
3442
- node_js: "lts/*"
3543
env: PREPUBLISH=true ESLINT=5 PACKAGE=eslint-config-airbnb-base
3644
- node_js: "lts/*"
3745
env: PREPUBLISH=true ESLINT=5 PACKAGE=eslint-config-airbnb
46+
- node_js: "lts/*"
47+
env: PREPUBLISH=true ESLINT=5 REACT_HOOKS=3 PACKAGE=eslint-config-airbnb
48+
- node_js: "lts/*"
49+
env: PREPUBLISH=true ESLINT=5 REACT_HOOKS=2.3 PACKAGE=eslint-config-airbnb
3850
- node_js: "lts/*"
3951
env: PREPUBLISH=true ESLINT=5 REACT_HOOKS=1.7 PACKAGE=eslint-config-airbnb
4052
- node_js: "lts/*"
@@ -47,6 +59,10 @@ matrix:
4759
env: TEST=true ESLINT=5 PACKAGE=eslint-config-airbnb-base
4860
- node_js: "6"
4961
env: TEST=true ESLINT=5 PACKAGE=eslint-config-airbnb
62+
- node_js: "6"
63+
env: TEST=true ESLINT=5 REACT_HOOKS=3 PACKAGE=eslint-config-airbnb
64+
- node_js: "6"
65+
env: TEST=true ESLINT=5 REACT_HOOKS=2.3 PACKAGE=eslint-config-airbnb
5066
- node_js: "6"
5167
env: TEST=true ESLINT=5 REACT_HOOKS=1.7 PACKAGE=eslint-config-airbnb
5268
exclude:

packages/eslint-config-airbnb/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
"eslint-plugin-import": "^2.21.2",
6969
"eslint-plugin-jsx-a11y": "^6.2.3",
7070
"eslint-plugin-react": "^7.20.0",
71-
"eslint-plugin-react-hooks": "^2.3.0 || ^1.7.0",
71+
"eslint-plugin-react-hooks": "^4 || ^3 || ^2.3.0 || ^1.7.0",
7272
"in-publish": "^2.0.1",
7373
"react": ">= 0.13.0",
7474
"safe-publish-latest": "^1.1.4",
@@ -79,7 +79,7 @@
7979
"eslint-plugin-import": "^2.21.2",
8080
"eslint-plugin-jsx-a11y": "^6.2.3",
8181
"eslint-plugin-react": "^7.20.0",
82-
"eslint-plugin-react-hooks": "^2.3.0 || ^1.7.0"
82+
"eslint-plugin-react-hooks": "^4 || ^3 || ^2.3.0 || ^1.7.0"
8383
},
8484
"engines": {
8585
"node": ">= 6"

0 commit comments

Comments
 (0)