dillon1000/react
Commit
Browse files [eslint] Consider `useRef() as ...` as constant (#18496)
Sometimes you need to use casts, eg: https://github.com/DefinitelyTyped/DefinitelyTyped/issues/28884#issuecomment-471341041. This change ignores them and allows you to still omit the ref object from the deps list. Test Plan: unit tests
Changed paths4 files
First-parent comparisonpackages/eslint-plugin-react-hooks/__tests__/ESLintRuleExhaustiveDeps-test.js ModifiedM packages/eslint-plugin-react-hooks/package.json ModifiedM packages/eslint-plugin-react-hooks/src/ExhaustiveDeps.js ModifiedM yarn.lock ModifiedPatch
Files changed
Rendering syntax-highlighted changes…