ESLint plugin for react-hook-form that enforces best practices and catches common mistakes during development. Current stable version is 0.3.1, with irregular release cadence (latest release May 2023). Provides rules like 'destructuring-formstate', 'no-access-control', 'no-nested-object-setvalue', and 'no-use-watch'. Differentiators: specifically targets react-hook-form API misuse (e.g., formState destructuring, control property access, nested objects in setValue, watch usage). Integrates via plugins and extends in ESLint config.
npm install eslint-plugin-react-hook-formVerified import paths — ran on the pinned version, not inferred.
Shows how to configure the ESLint plugin in .eslintrc.json, either by specifying individual rules or extending the recommended config.
Ensure ESLint is run on files that import react-hook-form and that the plugin is included in the ESLint configuration.
Disable the rule or add inline exceptions using eslint-disable comments.
Manually review calls to setValue with array arguments.
Override rules in your config if different severity is desired.
Run npm install eslint-plugin-react-hook-form --save-dev and ensure plugins array contains 'react-hook-form' (not 'eslint-plugin-react-hook-form').
Check that plugin is listed in plugins array and rule name is correct. Verify plugin version supports the rule.
Run npm install eslint-plugin-react-hook-form --save-dev.