Skip to content

Commit 3493b06

Browse files
perrin4869ljharb
authored andcommitted
[eslint config] [minor] Support eslint-plugin-react-hooks@2
1 parent 019e0f7 commit 3493b06

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

.travis.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,36 +11,47 @@ install:
1111
- 'if [ -n "${PACKAGE-}" ]; then cd "packages/${PACKAGE}"; fi'
1212
- 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ] || [ "${TRAVIS_NODE_VERSION}" = "0.9" ]; then nvm install --latest-npm 0.8 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;'
1313
- 'if [ -n "${ESLINT}" ]; then npm install --no-save "eslint@${ESLINT}"; fi'
14+
- 'if [ -n "${REACT_HOOKS}" ]; then npm install --no-save "eslint-plugin-react-hooks@${REACT_HOOKS}"; fi'
1415
script:
1516
- 'if [ -n "${PREPUBLISH-}" ]; then npm run pretravis && npm run prepublish && npm run posttravis; elif [ -n "${LINT-}" ]; then npm run lint; else npm run travis; fi'
1617
sudo: false
1718
env:
1819
matrix:
1920
- 'TEST=true ESLINT=6 PACKAGE=eslint-config-airbnb-base'
2021
- 'TEST=true ESLINT=6 PACKAGE=eslint-config-airbnb'
22+
- 'TEST=true ESLINT=6 REACT_HOOKS=1.7 PACKAGE=eslint-config-airbnb'
2123
- 'TEST=true ESLINT=5 PACKAGE=eslint-config-airbnb-base'
2224
- 'TEST=true ESLINT=5 PACKAGE=eslint-config-airbnb'
25+
- 'TEST=true ESLINT=5 REACT_HOOKS=1.7 PACKAGE=eslint-config-airbnb'
2326
matrix:
2427
fast_finish: true
2528
include:
2629
- node_js: "lts/*"
2730
env: PREPUBLISH=true ESLINT=6 PACKAGE=eslint-config-airbnb-base
2831
- node_js: "lts/*"
2932
env: PREPUBLISH=true ESLINT=6 PACKAGE=eslint-config-airbnb
33+
- node_js: "lts/*"
34+
env: PREPUBLISH=true ESLINT=6 REACT_HOOKS=1.7 PACKAGE=eslint-config-airbnb
3035
- node_js: "lts/*"
3136
env: PREPUBLISH=true ESLINT=5 PACKAGE=eslint-config-airbnb-base
3237
- node_js: "lts/*"
3338
env: PREPUBLISH=true ESLINT=5 PACKAGE=eslint-config-airbnb
39+
- node_js: "lts/*"
40+
env: PREPUBLISH=true ESLINT=5 REACT_HOOKS=1.7 PACKAGE=eslint-config-airbnb
3441
- node_js: "lts/*"
3542
env: LINT=true
3643
- node_js: "7"
3744
env: TEST=true ESLINT=5 PACKAGE=eslint-config-airbnb-base
3845
- node_js: "7"
3946
env: TEST=true ESLINT=5 PACKAGE=eslint-config-airbnb
47+
- node_js: "7"
48+
env: TEST=true ESLINT=5 REACT_HOOKS=1.7 PACKAGE=eslint-config-airbnb
4049
- node_js: "6"
4150
env: TEST=true ESLINT=5 PACKAGE=eslint-config-airbnb-base
4251
- node_js: "6"
4352
env: TEST=true ESLINT=5 PACKAGE=eslint-config-airbnb
53+
- node_js: "6"
54+
env: TEST=true ESLINT=5 REACT_HOOKS=1.7 PACKAGE=eslint-config-airbnb
4455
exclude:
4556
allow_failures:
4657
- node_js: "11"

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.20.1",
6969
"eslint-plugin-jsx-a11y": "^6.2.3",
7070
"eslint-plugin-react": "^7.18.3",
71-
"eslint-plugin-react-hooks": "^1.7.0",
71+
"eslint-plugin-react-hooks": "^2.0.0 || ^1.7.0",
7272
"in-publish": "^2.0.0",
7373
"react": ">= 0.13.0",
7474
"safe-publish-latest": "^1.1.4",
@@ -79,7 +79,7 @@
7979
"eslint-plugin-import": "^2.20.1",
8080
"eslint-plugin-jsx-a11y": "^6.2.3",
8181
"eslint-plugin-react": "^7.18.3",
82-
"eslint-plugin-react-hooks": "^1.7.0"
82+
"eslint-plugin-react-hooks": "^2.0.0 || ^1.7.0"
8383
},
8484
"engines": {
8585
"node": ">= 6"

0 commit comments

Comments
 (0)