mirror of
https://github.com/facebook/react.git
synced 2026-02-22 03:42:05 +00:00
`react-hooks/exhaustive-effect-dependencies` from `ValidateExhaustiveDeps` reports errors for both missing and extra effect deps. We already have `react-hooks/exhaustive-deps` that errors on missing dependencies. In the future we'd like to consolidate this all to the compiler based error, but for now there's a lot of overlap. Let's enable testing the extra dep warning by splitting out reporting modes. This PR - Creates `on`, `off`, `missing-only`, and `extra-only` reporting modes for the effect dep validation flag - Temporarily enables the new rule with `extra-only` in `eslint-plugin-react-hooks` - Adds additional null checking to `manualMemoLoc` to fix a bug found when running against the fixture
ESLint v9 Fixture
This fixture allows us to test e2e functionality for eslint-plugin-react-hooks with eslint version 9.
Run the following to test.
cd fixtures/eslint-v9
yarn
yarn build
yarn lint