
Security News
libxml2 Maintainer Ends Embargoed Vulnerability Reports, Citing Unsustainable Burden
Libxml2’s solo maintainer drops embargoed security fixes, highlighting the burden on unpaid volunteers who keep critical open source software secure.
eslint-plugin-react-hook-form
Advanced tools
react-hook-form is an awesome library which provide a neat solution for building forms. However, there are many rules for the API which may be missed by the developer. This plugin aims to check those rules automatically through ESLint. Thus brings better DX for react-hook-form.
You'll first need to install ESLint:
$ npm i eslint --save-dev
Next, install eslint-plugin-react-hook-form
:
$ npm install eslint-plugin-react-hook-form --save-dev
Add react-hook-form
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": ["react-hook-form"]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"react-hook-form/destructuring-formstate": "error"
}
}
or start with the recommended rule set:
{
"extends": "plugin:react-hook-form/recommended"
}
Rule | Description | Recommended | Fixable |
---|---|---|---|
destructuring-formstate | Use destructuring assignment to access the properties of formState . | ⛔️ | |
no-access-control | Avoid accessing the properties of control | ⛔️ | |
no-nested-object-setvalue | Avoid nested object in second argument of setValue | ⛔️ | 🔧 |
no-use-watch | Avoid using watch |
Icon | Description |
---|---|
⛔️ | Reports as error in recommended configuration |
⚠️ | Reports as warning in recommended configuration |
🔧 | Rule is fixable with eslint --fix |
FAQs
ESLint plugin for react-hook-form
The npm package eslint-plugin-react-hook-form receives a total of 5,838 weekly downloads. As such, eslint-plugin-react-hook-form popularity was classified as popular.
We found that eslint-plugin-react-hook-form demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Libxml2’s solo maintainer drops embargoed security fixes, highlighting the burden on unpaid volunteers who keep critical open source software secure.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.