dillon1000/react
Commit
Browse files [ESLint] Check deps when callback body is outside the Hook call, too (#18435)
* Refactor: visit CallExpression Instead of visiting the functions and looking up to see if they're in a Hook call, visit Hook calls and look down to see if there's a callback inside. I will need this refactor so I can visit functions declared outside the call. * Check deps when callback body is outside the Hook call * Handle the unknown case
Changed paths2 files
First-parent comparisonpackages/eslint-plugin-react-hooks/__tests__/ESLintRuleExhaustiveDeps-test.js ModifiedM packages/eslint-plugin-react-hooks/src/ExhaustiveDeps.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…