File tree Expand file tree Collapse file tree 1 file changed +0
-17
lines changed
packages/eslint-plugin-react-hooks/src Expand file tree Collapse file tree 1 file changed +0
-17
lines changed Original file line number Diff line number Diff line change 7
7
import type { Linter , Rule } from 'eslint' ;
8
8
9
9
import ExhaustiveDeps from './rules/ExhaustiveDeps' ;
10
- import {
11
- allRules ,
12
- mapErrorSeverityToESlint ,
13
- recommendedRules ,
14
- } from './shared/ReactCompiler' ;
15
10
import RulesOfHooks from './rules/RulesOfHooks' ;
16
11
17
12
// All rules
18
13
const rules = {
19
14
'exhaustive-deps' : ExhaustiveDeps ,
20
15
'rules-of-hooks' : RulesOfHooks ,
21
- ...Object . fromEntries (
22
- Object . entries ( allRules ) . map ( ( [ name , config ] ) => [ name , config . rule ] )
23
- ) ,
24
16
} satisfies Record < string , Rule . RuleModule > ;
25
17
26
18
// Config rules
27
19
const ruleConfigs = {
28
20
'react-hooks/rules-of-hooks' : 'error' ,
29
21
'react-hooks/exhaustive-deps' : 'warn' ,
30
- // Compiler rules
31
- ...Object . fromEntries (
32
- Object . entries ( recommendedRules ) . map ( ( [ name , ruleConfig ] ) => {
33
- return [
34
- 'react-hooks/' + name ,
35
- mapErrorSeverityToESlint ( ruleConfig . severity ) ,
36
- ] ;
37
- } ) ,
38
- ) ,
39
22
} satisfies Linter . RulesRecord ;
40
23
41
24
const plugin = {
You can’t perform that action at this time.
0 commit comments