Skip to content

Commit d55cc79

Browse files
michaelfaithpoteto
andauthored
refactor(eslint-plugin-react-hooks): move rules to rules folder (facebook#32411)
Since the compiler plugin is going to be merged into the hooks plugin, and ultimately decomposed into several more rules, it would be good to start creating a more traditional folder structure for the plugin. This change just moves the rules into a `rules` folder. Co-authored-by: lauren <[email protected]>
1 parent 11ca4f6 commit d55cc79

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

packages/eslint-plugin-react-hooks/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ If you are still using ESLint below 9.0.0, please continue to use `recommended-l
3636
For [ESLint 9.0.0 and above](https://eslint.org/blog/2024/04/eslint-v9.0.0-released/) users, add the `recommended-latest` config.
3737

3838
```js
39-
import reactHooks from 'eslint-plugin-react-hooks';
39+
import * as reactHooks from 'eslint-plugin-react-hooks';
4040

4141
export default [
4242
// ...
@@ -67,7 +67,7 @@ If you want more fine-grained configuration, you can instead add a snippet like
6767
#### Flat Config (eslint.config.js)
6868

6969
```js
70-
import reactHooks from 'eslint-plugin-react-hooks';
70+
import * as reactHooks from 'eslint-plugin-react-hooks';
7171

7272
export default [
7373
{

packages/eslint-plugin-react-hooks/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*/
7-
import RulesOfHooks from './RulesOfHooks';
8-
import ExhaustiveDeps from './ExhaustiveDeps';
7+
import RulesOfHooks from './rules/RulesOfHooks';
8+
import ExhaustiveDeps from './rules/ExhaustiveDeps';
99
import type {ESLint, Linter, Rule} from 'eslint';
1010

1111
// All rules

0 commit comments

Comments
 (0)