dillon1000/react
Commit
Browse files [ESLint] Consistently treat optional chaining as regular chaining (#19273)
* Revert "Fix ExhaustiveDeps ESLint rule throwing with optional chaining (#19260)" This reverts commit 0f84b0f02b5579d780a9f54497007c4c84aaebb7. * Re-add a test from #19260 * Remove all code for optional chaining support * Consistently treat optional chaining as regular chaining This is not ideal because our suggestions use normal chaining. But it gets rid of all current edge cases. * Add more tests * More consistency in treating normal and optional expressions * Add regression tests for every occurrence of Optional*
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…