You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

eslint-plugin-react-hook-form

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-react-hook-form - npm Package Compare versions

Comparing version

to
0.2.1

.github/ISSUE_TEMPLATE/bug_report.md

13

lib/index.js

@@ -17,7 +17,14 @@ /**

// import all rules in lib/rules
module.exports.rules = requireIndex(__dirname + "/rules");
module.exports.configs = {
recommended: {
plugins: ["react-hook-form"],
rules: {
"react-hook-form/destructuring-formstate": "error",
"react-hook-form/no-access-control": "error",
"react-hook-form/no-nested-object-setvalue": "error",
},
},
};
{
"name": "eslint-plugin-react-hook-form",
"version": "0.2.0",
"version": "0.2.1",
"description": "ESLint plugin for react-hook-form",

@@ -12,6 +12,8 @@ "keywords": [

],
"author": "Andrew Kao",
"author": "Andrew Kao <andykao1213@gmail.com>",
"main": "lib/index.js",
"repository": "https://github.com/andykao1213/eslint-plugin-react-hook-form.git",
"scripts": {
"test": "mocha tests --recursive"
"test": "mocha tests --recursive",
"release": "standard-version"
},

@@ -23,3 +25,4 @@ "dependencies": {

"eslint": "^7.1.0",
"mocha": "^7.2.0"
"mocha": "^7.2.0",
"standard-version": "^9.3.0"
},

@@ -26,0 +29,0 @@ "engines": {

# eslint-plugin-react-hook-form
[![npm version](https://img.shields.io/npm/v/eslint-plugin-react-hook-form?style=flat-square)](https://www.npmjs.com/package/eslint-plugin-react-hook-form)
[![GitHub](https://img.shields.io/github/license/andykao1213/eslint-plugin-react-hook-form?style=flat-square)](LICENSE)
[react-hook-form](https://github.com/react-hook-form/react-hook-form) is an awsome 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 thourgh ESLint. Thus brings better DX for react-hook-form.

@@ -39,4 +42,28 @@

or start with the recommended rule set:
```json
{
"extends": "plugin:react-hook-form/recommended"
}
```
## Supported Rules
- [destructuring-formState](docs/rules/destructuring-formstate.md)
| Rule | Description | Recommended | Fixable |
| -------------------------------------------------------------------- | --------------------------------------------------------------------- | ----------- | ------- |
| [destructuring-formState](docs/rules/destructuring-formstate.md) | Use destructuring assignment to access the properties of `formState`. | ⛔️ | |
| [no-access-control](docs/rules/no-access-control.md) | Avoid accessing the properties of `control` | ⛔️ | |
| [no-nested-object-setvalue](docs/rules/no-nested-object-setvalue.md) | Avoid nested object in second argument of `setValue` | ⛔️ | 🔧 |
### Key
| Icon | Description |
| ---- | ----------------------------------------------- |
| ⛔️ | Reports as error in recommended configuration |
| ⚠️ | Reports as warning in recommended configuration |
| 🔧 | Rule is fixable with `eslint --fix` |
## License
[MIT](LICENSE)
SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.