Skip to content

Commit ae74234

Browse files
authored
[eprh] Allow compiler rules to be opted-in but not in the preset (#34672)
Follow up to #34649. This adds the compiler rules back so they can be opted-in 6.1.0, but aren't included in the presets as that would be a breaking change.
1 parent 8618113 commit ae74234

File tree

1 file changed

+4
-0
lines changed
  • packages/eslint-plugin-react-hooks/src

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,16 @@
77
import type {Linter, Rule} from 'eslint';
88

99
import ExhaustiveDeps from './rules/ExhaustiveDeps';
10+
import {allRules} from './shared/ReactCompiler';
1011
import RulesOfHooks from './rules/RulesOfHooks';
1112

1213
// All rules
1314
const rules = {
1415
'exhaustive-deps': ExhaustiveDeps,
1516
'rules-of-hooks': RulesOfHooks,
17+
...Object.fromEntries(
18+
Object.entries(allRules).map(([name, config]) => [name, config.rule]),
19+
),
1620
} satisfies Record<string, Rule.RuleModule>;
1721

1822
// Config rules

0 commit comments

Comments
 (0)