Skip to content

Commit 7439b48

Browse files
tbroyergaearon
authored andcommitted
Add explicit support for ESLint 6.0.0 (#15974)
Preemptively update tests wrt 'parser' requiring an absolute path rather than a package name, even though the project is still using ESLint 4. Fixes #15971
1 parent fce15f1 commit 7439b48

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

packages/eslint-plugin-react-hooks/__tests__/ESLintRuleExhaustiveDeps-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const ReactHooksESLintPlugin = require('eslint-plugin-react-hooks');
1212
const ReactHooksESLintRule = ReactHooksESLintPlugin.rules['exhaustive-deps'];
1313

1414
ESLintTester.setDefaultConfig({
15-
parser: 'babel-eslint',
15+
parser: require.resolve('babel-eslint'),
1616
parserOptions: {
1717
ecmaVersion: 6,
1818
sourceType: 'module',

packages/eslint-plugin-react-hooks/__tests__/ESLintRulesOfHooks-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const ReactHooksESLintPlugin = require('eslint-plugin-react-hooks');
1212
const ReactHooksESLintRule = ReactHooksESLintPlugin.rules['rules-of-hooks'];
1313

1414
ESLintTester.setDefaultConfig({
15-
parser: 'babel-eslint',
15+
parser: require.resolve('babel-eslint'),
1616
parserOptions: {
1717
ecmaVersion: 6,
1818
sourceType: 'module',

packages/eslint-plugin-react-hooks/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@
2929
},
3030
"homepage": "https://reactjs.org/",
3131
"peerDependencies": {
32-
"eslint": "^3.0.0 || ^4.0.0 || ^5.0.0"
32+
"eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0"
3333
}
3434
}

0 commit comments

Comments
 (0)