diff --git a/packages/eslint-plugin-react-hooks/README.md b/packages/eslint-plugin-react-hooks/README.md index 36f63722f7..cf54caec98 100644 --- a/packages/eslint-plugin-react-hooks/README.md +++ b/packages/eslint-plugin-react-hooks/README.md @@ -36,7 +36,7 @@ If you are still using ESLint below 9.0.0, please continue to use `recommended-l For [ESLint 9.0.0 and above](https://eslint.org/blog/2024/04/eslint-v9.0.0-released/) users, add the `recommended-latest` config. ```js -import reactHooks from 'eslint-plugin-react-hooks'; +import * as reactHooks from 'eslint-plugin-react-hooks'; export default [ // ... @@ -67,7 +67,7 @@ If you want more fine-grained configuration, you can instead add a snippet like #### Flat Config (eslint.config.js) ```js -import reactHooks from 'eslint-plugin-react-hooks'; +import * as reactHooks from 'eslint-plugin-react-hooks'; export default [ { diff --git a/packages/eslint-plugin-react-hooks/src/index.ts b/packages/eslint-plugin-react-hooks/src/index.ts index 42b55320fc..5ddbbcbb80 100644 --- a/packages/eslint-plugin-react-hooks/src/index.ts +++ b/packages/eslint-plugin-react-hooks/src/index.ts @@ -4,8 +4,8 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ -import RulesOfHooks from './RulesOfHooks'; -import ExhaustiveDeps from './ExhaustiveDeps'; +import RulesOfHooks from './rules/RulesOfHooks'; +import ExhaustiveDeps from './rules/ExhaustiveDeps'; import type {ESLint, Linter, Rule} from 'eslint'; // All rules diff --git a/packages/eslint-plugin-react-hooks/src/ExhaustiveDeps.ts b/packages/eslint-plugin-react-hooks/src/rules/ExhaustiveDeps.ts similarity index 100% rename from packages/eslint-plugin-react-hooks/src/ExhaustiveDeps.ts rename to packages/eslint-plugin-react-hooks/src/rules/ExhaustiveDeps.ts diff --git a/packages/eslint-plugin-react-hooks/src/RulesOfHooks.ts b/packages/eslint-plugin-react-hooks/src/rules/RulesOfHooks.ts similarity index 100% rename from packages/eslint-plugin-react-hooks/src/RulesOfHooks.ts rename to packages/eslint-plugin-react-hooks/src/rules/RulesOfHooks.ts