File tree Expand file tree Collapse file tree 3 files changed +19
-2
lines changed
packages/eslint-plugin-react-hooks/src Expand file tree Collapse file tree 3 files changed +19
-2
lines changed Original file line number Diff line number Diff line change 1111
1212export default {
1313 meta : {
14+ type : 'suggestion' ,
15+ docs : {
16+ description :
17+ 'verifies the list of dependencies for Hooks like useEffect and similar' ,
18+ category : 'Best Practices' ,
19+ recommended : true ,
20+ url : 'https://github.com/facebook/react/issues/14920' ,
21+ } ,
1422 fixable : 'code' ,
1523 schema : [
1624 {
Original file line number Diff line number Diff line change @@ -106,6 +106,15 @@ function isInsideComponentOrHook(node) {
106106}
107107
108108export default {
109+ meta : {
110+ type : 'problem' ,
111+ docs : {
112+ description : 'enforces the Rules of Hooks' ,
113+ category : 'Possible Errors' ,
114+ recommended : true ,
115+ url : 'https://reactjs.org/docs/hooks-rules.html' ,
116+ } ,
117+ } ,
109118 create ( context ) {
110119 const codePathReactHooksMapStack = [ ] ;
111120 const codePathSegmentStack = [ ] ;
Original file line number Diff line number Diff line change 77
88'use strict' ;
99
10- import RuleOfHooks from './RulesOfHooks' ;
10+ import RulesOfHooks from './RulesOfHooks' ;
1111import ExhaustiveDeps from './ExhaustiveDeps' ;
1212
1313export const configs = {
@@ -21,6 +21,6 @@ export const configs = {
2121} ;
2222
2323export const rules = {
24- 'rules-of-hooks' : RuleOfHooks ,
24+ 'rules-of-hooks' : RulesOfHooks ,
2525 'exhaustive-deps' : ExhaustiveDeps ,
2626} ;
You can’t perform that action at this time.
0 commit comments