From 18244a2956b0adc349bd0336ff9c9dcf9939daad Mon Sep 17 00:00:00 2001 From: Evgeny Orekhov Date: Thu, 20 Jan 2022 12:33:39 +0300 Subject: [PATCH] Fix #349 Add eslint-plugin-react-form-fields --- README.md | 5 +++-- package-lock.json | 9 +++++++++ package.json | 1 + react.json | 4 ++++ 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1348e450..c3bb97db 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ The most strict (yet practical) ESLint config. Aims to include as many plugins and rules as possible to make your code extremely consistent and robust. -**33 plugins. 1032 rules.** +**34 plugins. 1036 rules.** ## Usage @@ -151,10 +151,11 @@ Config for React. | [eslint-plugin-react](https://github.com/yannickcr/eslint-plugin-react) | 77 | | [eslint-plugin-jsx-a11y](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y) | 32 | | [eslint-plugin-react-perf](https://github.com/cvazac/eslint-plugin-react-perf) | 4 | +| [eslint-plugin-react-form-fields](https://github.com/kotarella1110/eslint-plugin-react-form-fields) | 4 | | [@shopify/eslint-plugin](https://github.com/Shopify/web-configs/tree/main/packages/eslint-plugin) | 3 | | [eslint-plugin-react-hook-form](https://github.com/andykao1213/eslint-plugin-react-hook-form) | 3 | | [eslint-plugin-react-hooks](https://github.com/facebook/react/tree/main/packages/eslint-plugin-react-hooks) | 2 | -| **Total:** | **121** | +| **Total:** | **125** | ### `hardcore/react-testing-library` diff --git a/package-lock.json b/package-lock.json index c23097f8..eadd8d0e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3430,6 +3430,15 @@ } } }, + "eslint-plugin-react-form-fields": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-form-fields/-/eslint-plugin-react-form-fields-1.2.0.tgz", + "integrity": "sha512-dsXbRMHaEdIkQjN2rYhS4tnU6fro3R9KqEpuEc3HGh0ykosGoIqovF+F3GvzxEij+sVPdCpKSWidighYND7kfw==", + "requires": { + "@typescript-eslint/experimental-utils": "^5.10.0", + "jsx-ast-utils": "^3.2.1" + } + }, "eslint-plugin-react-hook-form": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/eslint-plugin-react-hook-form/-/eslint-plugin-react-hook-form-0.2.2.tgz", diff --git a/package.json b/package.json index f66a3dc1..280a02fb 100644 --- a/package.json +++ b/package.json @@ -62,6 +62,7 @@ "eslint-plugin-putout": "^13.5.0", "eslint-plugin-ramda": "^2.5.1", "eslint-plugin-react": "^7.28.0", + "eslint-plugin-react-form-fields": "^1.2.0", "eslint-plugin-react-hook-form": "^0.2.2", "eslint-plugin-react-hooks": "^4.3.0", "eslint-plugin-react-perf": "^3.3.1", diff --git a/react.json b/react.json index 75e401e3..56ad6179 100644 --- a/react.json +++ b/react.json @@ -6,6 +6,7 @@ "plugin:react-perf/all", "plugin:jsx-a11y/recommended", "plugin:react-hook-form/recommended", + "plugin:react-form-fields/recommended", "./prettier.json" ], @@ -55,6 +56,9 @@ "@shopify/react-hooks-strict-return": "error", "@shopify/react-no-multiple-render-methods": "error", + "react-form-fields/styled-no-mix-controlled-with-uncontrolled": "error", + "react-form-fields/styled-no-only-value-prop": "error", + "react/jsx-no-literals": "off", "react/react-in-jsx-scope": "off" },