Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eslint-plugin-react-form-fields

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-react-form-fields

React Form Fields specific linting rules for ESLint

  • 1.2.22
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
616
decreased by-61.36%
Maintainers
1
Weekly downloads
 
Created
Source

eslint-plugin-react-form-fields

React Form Fields specific linting rules for ESLint

License Actions Status NPM Version Downloads Month Downloads Total Dependencies Status Semantic Release Commitizen Friendly PRs Welcome

All Contributors

Installation

Install ESLint either locally or globally. (Note that locally, per project, is strongly preferred)

$ npm install eslint --save-dev

If you installed ESLint globally, you have to install React plugin globally too. Otherwise, install it locally.

$ npm install eslint-plugin-react-form-fields --save-dev

Configuration

Use our preset to get reasonable defaults:

  "extends": [
    "eslint:recommended",
    "plugin:react-form-fields/recommended"
  ]

If you do not use a preset you will need to specify individual rules and add extra configuration.

Add "react-form-fields" to the plugins section.

{
  "plugins": ["react-form-fields"]
}

Enable the rules that you would like to use.

  "rules": {
    "react-form-fields/no-mix-controlled-with-uncontrolled": "error",
    "react-form-fields/no-only-value-prop": "error"
  }

See also Configuring ESLint.

Rules

Possible Errors

Rule IDDescription
react-form-fields/no-mix-controlled-with-uncontrolledForbid to specify both value/checked and defaultValue/defaultChecked props to form fields⭐️
react-form-fields/no-only-value-propForbid to specify only value/checked without onChange and readOnly props to form fields⭐️
react-form-fields/styled-no-mix-controlled-with-uncontrolledForbid to specify both value/checked and defaultValue/defaultChecked props to form fields
react-form-fields/styled-no-only-value-propForbid to specify only value/checked without onChange and readOnly props to form fields

Semantic Versioning Policy

This plugin follows Semantic Versioning and ESLint's Semantic Versioning Policy.

Contributing

Welcome your contribution!

See also ESLint Contribution Guide.

Development Tools

  • npm test runs tests.
  • npm run update updates the package version. And it updates src/configs/recommended.ts, lib/index.ts, and README.md's rule table. See also npm version CLI command.
  • npm run add-rule <RULE_ID> creates three files to add a new rule.

Contributors

Thanks goes to these wonderful people (emoji key):


Kotaro Sugawara

💻 📖 🤔 🚇 ⚠️

This project follows the all-contributors specification. Contributions of any kind welcome!

License

MIT © Kotaro Sugawara

Keywords

FAQs

Package last updated on 31 May 2022

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc