mirror of
https://github.com/zebrajr/react.git
synced 2025-12-06 12:20:20 +01:00
[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.
This commit is contained in:
parent
861811347b
commit
ae74234eae
|
|
@ -7,12 +7,16 @@
|
|||
import type {Linter, Rule} from 'eslint';
|
||||
|
||||
import ExhaustiveDeps from './rules/ExhaustiveDeps';
|
||||
import {allRules} from './shared/ReactCompiler';
|
||||
import RulesOfHooks from './rules/RulesOfHooks';
|
||||
|
||||
// All rules
|
||||
const rules = {
|
||||
'exhaustive-deps': ExhaustiveDeps,
|
||||
'rules-of-hooks': RulesOfHooks,
|
||||
...Object.fromEntries(
|
||||
Object.entries(allRules).map(([name, config]) => [name, config.rule]),
|
||||
),
|
||||
} satisfies Record<string, Rule.RuleModule>;
|
||||
|
||||
// Config rules
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user