包详细信息

eslint-plugin-react-form-fields

kotarella11106.2kMIT1.2.22

React Form Fields specific linting rules for ESLint

typescript, template, eslint, eslint-plugin

自述文件

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 ID Description
react-form-fields/no-mix-controlled-with-uncontrolled Forbid to specify both value/checked and defaultValue/defaultChecked props to form fields ⭐️
react-form-fields/no-only-value-prop Forbid to specify only value/checked without onChange and readOnly props to form fields ⭐️
react-form-fields/styled-no-mix-controlled-with-uncontrolled Forbid to specify both value/checked and defaultValue/defaultChecked props to form fields
react-form-fields/styled-no-only-value-prop Forbid 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

更新日志

1.2.22 (2022-05-31)

Bug Fixes

  • deps: bump @typescript-eslint/experimental-utils (#306) (ded99a9)

1.2.21 (2022-05-24)

Bug Fixes

  • deps: bump @typescript-eslint/experimental-utils (#298) (f9d0355)

1.2.20 (2022-05-18)

Bug Fixes

  • deps: bump @typescript-eslint/experimental-utils (#293) (f5f4758)

1.2.19 (2022-05-17)

Bug Fixes

  • deps: bump @typescript-eslint/experimental-utils (#289) (81f9b84)

1.2.18 (2022-05-10)

Bug Fixes

  • deps: bump @typescript-eslint/experimental-utils (#284) (fa86228)

1.2.17 (2022-05-03)

Bug Fixes

  • deps: bump @typescript-eslint/experimental-utils (#278) (1e44796)

1.2.16 (2022-05-02)

Bug Fixes

  • deps: bump jsx-ast-utils from 3.2.2 to 3.3.0 (#275) (4420312)

1.2.15 (2022-04-26)

Bug Fixes

  • deps: bump @typescript-eslint/experimental-utils (#268) (eb6fb02)

1.2.14 (2022-04-19)

Bug Fixes

  • deps: bump @typescript-eslint/experimental-utils (#262) (8724482)

1.2.13 (2022-04-12)

Bug Fixes

  • deps: bump @typescript-eslint/experimental-utils (#258) (735b4bb)

1.2.12 (2022-04-05)

Bug Fixes

  • deps: bump @typescript-eslint/experimental-utils (#254) (42b8885)

1.2.11 (2022-04-01)

Bug Fixes

  • deps: bump jsx-ast-utils from 3.2.1 to 3.2.2 (#252) (c4bf819)

1.2.10 (2022-03-29)

Bug Fixes

  • deps: bump @typescript-eslint/experimental-utils (#250) (4669efd)

1.2.9 (2022-03-22)

Bug Fixes

  • deps: bump @typescript-eslint/experimental-utils (#243) (ebebcaf)

1.2.8 (2022-03-16)

Bug Fixes

  • deps: bump @typescript-eslint/experimental-utils (#237) (8a1a146)

1.2.8 (2022-03-15)

Bug Fixes

  • deps: bump @typescript-eslint/experimental-utils (#237) (8a1a146)

1.2.7 (2022-03-08)

Bug Fixes

  • deps: bump @typescript-eslint/experimental-utils (#231) (93dfa44)

1.2.6 (2022-03-01)

Bug Fixes

  • deps: bump @typescript-eslint/experimental-utils (#227) (986b61d)

1.2.5 (2022-02-22)

Bug Fixes

  • deps: bump @typescript-eslint/experimental-utils (#221) (2f7bdc8)

1.2.4 (2022-02-15)

Bug Fixes

  • deps: bump @typescript-eslint/experimental-utils (#216) (55b36d9)

1.2.3 (2022-02-08)

Bug Fixes

  • deps: bump @typescript-eslint/experimental-utils (#208) (c5a7b3c)

1.2.2 (2022-02-01)

Bug Fixes

  • deps: bump @typescript-eslint/experimental-utils (#205) (8e24f27)

1.2.1 (2022-01-25)

Bug Fixes

  • deps: bump @typescript-eslint/experimental-utils (#200) (149d858)

1.2.0 (2022-01-20)

Features

1.1.7 (2022-01-20)

Bug Fixes

  • deps: bump jsx-ast-utils from 3.2.0 to 3.2.1 (#146) (5c531ad)

1.1.6 (2022-01-20)

Bug Fixes

  • deps: bump @typescript-eslint/experimental-utils (#100) (77aa51e)
  • deps: bump @typescript-eslint/experimental-utils (#107) (c9dd109)
  • deps: bump @typescript-eslint/experimental-utils (#117) (da244be)
  • deps: bump @typescript-eslint/experimental-utils (#123) (11cc931)
  • deps: bump @typescript-eslint/experimental-utils (#133) (71dc84f)
  • deps: bump @typescript-eslint/experimental-utils (#76) (76ba339)
  • deps: bump @typescript-eslint/experimental-utils (#82) (b745f22)
  • deps: bump @typescript-eslint/experimental-utils (#86) (5b61be9)
  • deps: bump @typescript-eslint/experimental-utils (#96) (ec98e15)
  • utils: fix propertyToJSXAttribute type error (#183) (d1412b9)

1.1.5 (2021-06-15)

Bug Fixes

  • deps: bump @typescript-eslint/experimental-utils (#69) (b04189b)

1.1.4 (2021-06-08)

Bug Fixes

  • deps: bump @typescript-eslint/experimental-utils (#67) (d402fbe)

1.1.3 (2021-06-01)

Bug Fixes

  • deps: bump @typescript-eslint/experimental-utils (#62) (4673906)

1.1.2 (2021-05-25)

Bug Fixes

  • deps: bump @typescript-eslint/experimental-utils (#55) (a5b0d3f)

1.1.1 (2021-05-24)

Bug Fixes

  • deps: bump @typescript-eslint/experimental-utils (84532b3)

1.1.0 (2021-05-13)

Features

1.0.4 (2021-05-04)

Bug Fixes

  • deps: bump @typescript-eslint/experimental-utils (4146dae)

1.0.3 (2021-04-14)

Bug Fixes

  • exclude from no-only-value-prop rule when input type is hidden (#23) (96044cb)

1.0.2 (2021-04-13)

Bug Fixes

  • deps: bump @typescript-eslint/experimental-utils (dcd4949)

1.0.1 (2021-04-06)

Bug Fixes

  • change from dynamic import to require (#11) (33c02c3)

1.0.0 (2021-04-06)

Bug Fixes

  • deps: bump @typescript-eslint/experimental-utils (7e2e0ae)

Features

  • add no-mix-controlled-with-uncontrolled rule (de39114)
  • add no-only-value-prop rule (8217b34)
  • init (a34d4e6)