mirror of
https://github.com/zebrajr/react.git
synced 2025-12-06 12:20:20 +01:00
refactor(eslint-plugin-react-hooks): move rules to rules folder (#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 <poteto@users.noreply.github.com>
This commit is contained in:
parent
11ca4f6b69
commit
d55cc79bcf
|
|
@ -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.
|
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
|
```js
|
||||||
import reactHooks from 'eslint-plugin-react-hooks';
|
import * as reactHooks from 'eslint-plugin-react-hooks';
|
||||||
|
|
||||||
export default [
|
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)
|
#### Flat Config (eslint.config.js)
|
||||||
|
|
||||||
```js
|
```js
|
||||||
import reactHooks from 'eslint-plugin-react-hooks';
|
import * as reactHooks from 'eslint-plugin-react-hooks';
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,8 @@
|
||||||
* This source code is licensed under the MIT license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
import RulesOfHooks from './RulesOfHooks';
|
import RulesOfHooks from './rules/RulesOfHooks';
|
||||||
import ExhaustiveDeps from './ExhaustiveDeps';
|
import ExhaustiveDeps from './rules/ExhaustiveDeps';
|
||||||
import type {ESLint, Linter, Rule} from 'eslint';
|
import type {ESLint, Linter, Rule} from 'eslint';
|
||||||
|
|
||||||
// All rules
|
// All rules
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user