From e66c5dd2335131c0a96d66bbb401b541ff29672e Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Thu, 18 Jun 2020 11:11:34 +0400 Subject: Added react and react-hooks plugins Signed-off-by: Valentin Popov --- docs/roadmap/react.md | 89 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 docs/roadmap/react.md (limited to 'docs/roadmap/react.md') diff --git a/docs/roadmap/react.md b/docs/roadmap/react.md new file mode 100644 index 0000000..20a9b26 --- /dev/null +++ b/docs/roadmap/react.md @@ -0,0 +1,89 @@ +# React + +- [ ] "boolean-prop-naming" +- [ ] "button-has-type" +- [ ] "default-props-match-prop-types" +- [ ] "destructuring-assignment" +- [ ] "display-name" +- [ ] "forbid-component-props" +- [ ] "forbid-dom-props" +- [ ] "forbid-elements" +- [ ] "forbid-foreign-prop-types" +- [ ] "forbid-prop-types" +- [ ] "function-component-definition" +- [ ] "jsx-boolean-value" +- [ ] "jsx-child-element-spacing" +- [ ] "jsx-closing-bracket-location" +- [ ] "jsx-closing-tag-location" +- [ ] "jsx-curly-brace-presence" +- [ ] "jsx-curly-newline" +- [ ] "jsx-curly-spacing" +- [ ] "jsx-equals-spacing" +- [ ] "jsx-filename-extension" +- [ ] "jsx-first-prop-new-line" +- [ ] "jsx-fragments" +- [ ] "jsx-handler-names" +- [ ] "jsx-indent" +- [ ] "jsx-indent-props" +- [ ] "jsx-key" +- [ ] "jsx-max-depth" +- [ ] "jsx-max-props-per-line" +- [ ] "jsx-no-bind" +- [ ] "jsx-no-comment-textnodes" +- [ ] "jsx-no-duplicate-props" +- [ ] "jsx-no-literals" +- [ ] "jsx-no-script-url" +- [ ] "jsx-no-target-blank" +- [ ] "jsx-no-undef" +- [ ] "jsx-no-useless-fragment" +- [ ] "jsx-one-expression-per-line" +- [ ] "jsx-pascal-case" +- [ ] "jsx-props-no-multi-spaces" +- [ ] "jsx-props-no-spreading" +- [ ] "jsx-sort-default-props" +- [ ] "jsx-sort-props" +- [ ] "jsx-space-before-closing" +- [ ] "jsx-tag-spacing" +- [ ] "jsx-uses-react" +- [ ] "jsx-uses-vars" +- [ ] "jsx-wrap-multilines" +- [ ] "no-access-state-in-setstate" +- [ ] "no-adjacent-inline-elements" +- [ ] "no-array-index-key" +- [ ] "no-children-prop" +- [ ] "no-danger" +- [ ] "no-danger-with-children" +- [ ] "no-deprecated" +- [ ] "no-did-mount-set-state" +- [ ] "no-did-update-set-state" +- [ ] "no-direct-mutation-state" +- [ ] "no-find-dom-node" +- [ ] "no-is-mounted" +- [ ] "no-multi-comp" +- [ ] "no-redundant-should-component-update" +- [ ] "no-render-return-value" +- [ ] "no-set-state" +- [ ] "no-string-refs" +- [ ] "no-this-in-sfc" +- [ ] "no-typos" +- [ ] "no-unescaped-entities" +- [ ] "no-unknown-property" +- [ ] "no-unsafe" +- [ ] "no-unused-prop-types" +- [ ] "no-unused-state" +- [ ] "no-will-update-set-state" +- [ ] "prefer-es6-class" +- [ ] "prefer-read-only-props" +- [ ] "prefer-stateless-function" +- [ ] "prop-types" +- [ ] "react-in-jsx-scope" +- [ ] "require-default-props" +- [ ] "require-optimization" +- [ ] "require-render-return" +- [ ] "self-closing-comp" +- [ ] "sort-comp" +- [ ] "sort-prop-types" +- [ ] "state-in-constructor" +- [ ] "static-property-placement" +- [ ] "style-prop-object" +- [ ] "void-dom-elements-no-children" -- cgit v1.2.3 From 6cef3fc8443d497f473e78e5452af9e6840d9975 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Thu, 18 Jun 2020 11:53:24 +0400 Subject: Added some react rules Signed-off-by: Valentin Popov --- docs/roadmap/react.md | 6 +++--- src/rules/react/default.json | 17 ++++++++++++++++- 2 files changed, 19 insertions(+), 4 deletions(-) (limited to 'docs/roadmap/react.md') diff --git a/docs/roadmap/react.md b/docs/roadmap/react.md index 20a9b26..9b4631d 100644 --- a/docs/roadmap/react.md +++ b/docs/roadmap/react.md @@ -11,7 +11,7 @@ - [ ] "forbid-foreign-prop-types" - [ ] "forbid-prop-types" - [ ] "function-component-definition" -- [ ] "jsx-boolean-value" +- [X] "jsx-boolean-value" - [ ] "jsx-child-element-spacing" - [ ] "jsx-closing-bracket-location" - [ ] "jsx-closing-tag-location" @@ -21,7 +21,7 @@ - [ ] "jsx-equals-spacing" - [ ] "jsx-filename-extension" - [ ] "jsx-first-prop-new-line" -- [ ] "jsx-fragments" +- [X] "jsx-fragments" - [ ] "jsx-handler-names" - [ ] "jsx-indent" - [ ] "jsx-indent-props" @@ -69,7 +69,7 @@ - [ ] "no-unescaped-entities" - [ ] "no-unknown-property" - [ ] "no-unsafe" -- [ ] "no-unused-prop-types" +- [X] "no-unused-prop-types" - [ ] "no-unused-state" - [ ] "no-will-update-set-state" - [ ] "prefer-es6-class" diff --git a/src/rules/react/default.json b/src/rules/react/default.json index 0967ef4..66a8727 100644 --- a/src/rules/react/default.json +++ b/src/rules/react/default.json @@ -1 +1,16 @@ -{} +{ + "react/jsx-boolean-value": [ + "error", + "always" + ], + "react/jsx-fragments": [ + "error", + "element" + ], + "react/no-unused-prop-types": [ + "warn", + { + "skipShapeProps": false + } + ] +} \ No newline at end of file -- cgit v1.2.3