
Security News
Node.js Moves Toward Stable TypeScript Support with Amaro 1.0
Amaro 1.0 lays the groundwork for stable TypeScript support in Node.js, bringing official .ts loading closer to reality.
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
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
Amaro 1.0 lays the groundwork for stable TypeScript support in Node.js, bringing official .ts loading closer to reality.
Research
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.