From 095a31c8fb4575dd1b02d4c10a188368398e0749 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Thu, 18 Jun 2020 11:01:17 +0400 Subject: Added jsx-a11y plugin Signed-off-by: Valentin Popov --- src/rules/jsx-a11y/default.json | 1 + src/rules/react/default.json | 1 + 2 files changed, 2 insertions(+) create mode 100644 src/rules/jsx-a11y/default.json create mode 100644 src/rules/react/default.json (limited to 'src/rules') diff --git a/src/rules/jsx-a11y/default.json b/src/rules/jsx-a11y/default.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/src/rules/jsx-a11y/default.json @@ -0,0 +1 @@ +{} diff --git a/src/rules/react/default.json b/src/rules/react/default.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/src/rules/react/default.json @@ -0,0 +1 @@ +{} -- cgit v1.2.3 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-hooks.md | 4 + docs/roadmap/react.md | 89 ++++++++++++++++++++ package-lock.json | 161 +++++++++++++++++++++++++++++++++++++ package.json | 4 + src/react-javascript.ts | 12 +++ src/rules/react-hooks/default.json | 1 + 6 files changed, 271 insertions(+) create mode 100644 docs/roadmap/react-hooks.md create mode 100644 docs/roadmap/react.md create mode 100644 src/rules/react-hooks/default.json (limited to 'src/rules') diff --git a/docs/roadmap/react-hooks.md b/docs/roadmap/react-hooks.md new file mode 100644 index 0000000..2e651d4 --- /dev/null +++ b/docs/roadmap/react-hooks.md @@ -0,0 +1,4 @@ +# React Hooks + +- [ ] "exhaustive-deps" +- [ ] "rules-of-hooks" 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" diff --git a/package-lock.json b/package-lock.json index d3edb9a..500c4d2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -39,6 +39,16 @@ "regenerator-runtime": "^0.13.4" } }, + "@babel/runtime-corejs3": { + "version": "7.10.2", + "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.10.2.tgz", + "integrity": "sha512-+a2M/u7r15o3dV1NEizr9bRi+KUVnrs/qYxF0Z06DAPx/4VCWaz1WA7EcbE+uqGgt39lp5akWGmHsTseIkHkHg==", + "dev": true, + "requires": { + "core-js-pure": "^3.0.0", + "regenerator-runtime": "^0.13.4" + } + }, "@rollup/plugin-json": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/@rollup/plugin-json/-/plugin-json-4.1.0.tgz", @@ -385,6 +395,12 @@ "integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=", "dev": true }, + "core-js-pure": { + "version": "3.6.5", + "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.6.5.tgz", + "integrity": "sha512-lacdXOimsiD0QyNf9BC/mxivNJ/ybBGJXQFKzRekp1WTHoVUWsUHEn+2T8GJAzzIhyOuXA+gOxCVN3l+5PLPUA==", + "dev": true + }, "cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -737,6 +753,42 @@ } } }, + "eslint-plugin-react": { + "version": "7.20.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.20.0.tgz", + "integrity": "sha512-rqe1abd0vxMjmbPngo4NaYxTcR3Y4Hrmc/jg4T+sYz63yqlmJRknpEQfmWY+eDWPuMmix6iUIK+mv0zExjeLgA==", + "dev": true, + "requires": { + "array-includes": "^3.1.1", + "doctrine": "^2.1.0", + "has": "^1.0.3", + "jsx-ast-utils": "^2.2.3", + "object.entries": "^1.1.1", + "object.fromentries": "^2.0.2", + "object.values": "^1.1.1", + "prop-types": "^15.7.2", + "resolve": "^1.15.1", + "string.prototype.matchall": "^4.0.2", + "xregexp": "^4.3.0" + }, + "dependencies": { + "doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + } + } + }, + "eslint-plugin-react-hooks": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.0.4.tgz", + "integrity": "sha512-equAdEIsUETLFNCmmCkiCGq6rkSK5MoJhXFPFYeUebcjKgBmWWcgVOqZyQC8Bv1BwVCnTq9tBxgJFgAJTWoJtA==", + "dev": true + }, "eslint-plugin-security": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/eslint-plugin-security/-/eslint-plugin-security-1.4.0.tgz", @@ -1274,6 +1326,17 @@ } } }, + "internal-slot": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.2.tgz", + "integrity": "sha512-2cQNfwhAfJIkU4KZPkDI+Gj5yNNnbqi40W9Gge6dfnk4TocEVm00B3bdiL+JINrbGJil2TeHvM4rETGzk/f/0g==", + "dev": true, + "requires": { + "es-abstract": "^1.17.0-next.1", + "has": "^1.0.3", + "side-channel": "^1.0.2" + } + }, "is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", @@ -1485,6 +1548,15 @@ "integrity": "sha1-7GZi5IlkCO1KtsVCo5kLcswIACA=", "dev": true }, + "loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dev": true, + "requires": { + "js-tokens": "^3.0.0 || ^4.0.0" + } + }, "merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", @@ -1565,6 +1637,12 @@ } } }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true + }, "object-inspect": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz", @@ -1589,6 +1667,29 @@ "object-keys": "^1.0.11" } }, + "object.entries": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.2.tgz", + "integrity": "sha512-BQdB9qKmb/HyNdMNWVr7O3+z5MUIx3aiegEIJqjMBbBf0YT9RRxTJSim4mzFqtyr7PDAHigq0N9dO0m0tRakQA==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5", + "has": "^1.0.3" + } + }, + "object.fromentries": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.2.tgz", + "integrity": "sha512-r3ZiBH7MQppDJVLx6fhD618GKNG40CZYH9wgwdhKxBDDbQgjeWGGd4AtkZad84d291YxvWe7bJGuE65Anh0dxQ==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1", + "function-bind": "^1.1.1", + "has": "^1.0.3" + } + }, "object.values": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.1.tgz", @@ -1753,6 +1854,17 @@ "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", "dev": true }, + "prop-types": { + "version": "15.7.2", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz", + "integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==", + "dev": true, + "requires": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.8.1" + } + }, "punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", @@ -1768,6 +1880,12 @@ "safe-buffer": "^5.1.0" } }, + "react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", + "dev": true + }, "read-pkg": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", @@ -1801,6 +1919,16 @@ "integrity": "sha512-kUUXjX4AnqnR8KRTCrayAo9PzYMRKmVoGgaz2tBuz0MF3g1ZbGebmtW0yFHfFK9CmBjQKeYIgoL22pFLBJY7sw==", "dev": true }, + "regexp.prototype.flags": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.3.0.tgz", + "integrity": "sha512-2+Q0C5g951OlYlJz6yu5/M33IcsESLlLfsyIaLJaG4FA2r4yP8MvVMJUUP/fVBkSpbbbZlS5gynbEWLipiiXiQ==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1" + } + }, "regexpp": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz", @@ -1945,6 +2073,16 @@ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true }, + "side-channel": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.2.tgz", + "integrity": "sha512-7rL9YlPHg7Ancea1S96Pa8/QWb4BtXL/TZvS6B8XFetGBeuhAsfmUspK6DokBeZ64+Kj9TCNRD/30pVz1BvQNA==", + "dev": true, + "requires": { + "es-abstract": "^1.17.0-next.1", + "object-inspect": "^1.7.0" + } + }, "signal-exit": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", @@ -2035,6 +2173,20 @@ "strip-ansi": "^6.0.0" } }, + "string.prototype.matchall": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.2.tgz", + "integrity": "sha512-N/jp6O5fMf9os0JU3E72Qhf590RSRZU/ungsL/qJUYVTNv7hTG0P/dbPjxINVN9jpscu3nzYwKESU3P3RY5tOg==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0", + "has-symbols": "^1.0.1", + "internal-slot": "^1.0.2", + "regexp.prototype.flags": "^1.3.0", + "side-channel": "^1.0.2" + } + }, "string.prototype.trimend": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz", @@ -2306,6 +2458,15 @@ "requires": { "mkdirp": "^0.5.1" } + }, + "xregexp": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/xregexp/-/xregexp-4.3.0.tgz", + "integrity": "sha512-7jXDIFXh5yJ/orPn4SXjuVrWWoi4Cr8jfV1eHv9CixKSbU+jY4mxfrBwAuDvupPNKpMUY+FeIqsVw/JLT9+B8g==", + "dev": true, + "requires": { + "@babel/runtime-corejs3": "^7.8.3" + } } } } diff --git a/package.json b/package.json index 75e09f9..c826c88 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,8 @@ "eslint-plugin-eslint-comments": "^3.2.0", "eslint-plugin-import": "^2.21.2", "eslint-plugin-jsx-a11y": "^6.2.3", + "eslint-plugin-react": "^7.20.0", + "eslint-plugin-react-hooks": "^4.0.4", "eslint-plugin-security": "^1.4.0", "eslint-plugin-sonarjs": "^0.5.0", "eslint-plugin-unicorn": "^20.1.0", @@ -36,6 +38,8 @@ "eslint-plugin-eslint-comments": "^3.2.0", "eslint-plugin-import": "^2.21.2", "eslint-plugin-jsx-a11y": "^6.2.3", + "eslint-plugin-react": "^7.20.0", + "eslint-plugin-react-hooks": "^4.0.4", "eslint-plugin-security": "^1.4.0", "eslint-plugin-sonarjs": "^0.5.0", "eslint-plugin-unicorn": "^20.1.0", diff --git a/src/react-javascript.ts b/src/react-javascript.ts index 813e859..e3bea86 100644 --- a/src/react-javascript.ts +++ b/src/react-javascript.ts @@ -1,15 +1,27 @@ import rJsxA11y from "./rules/jsx-a11y/default.json"; +import rReactHooks from "./rules/react-hooks/default.json"; import rDefault from "./rules/react/default.json"; module.exports = { "extends": [ "./javascript", + "plugin:jsx-a11y/recommended", + "plugin:react-hooks/recommended", + "plugin:react/recommended", ], + "parserOptions": { + ecmaFeatures: { + jsx: true, + }, + }, "plugins": [ "jsx-a11y", + "react", + "react-hooks", ], "rules": { ...rDefault, ...rJsxA11y, + ...rReactHooks, }, }; diff --git a/src/rules/react-hooks/default.json b/src/rules/react-hooks/default.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/src/rules/react-hooks/default.json @@ -0,0 +1 @@ +{} -- cgit v1.2.3 From 58e080f2e77b405ad12765f62b3945fa0f776ef6 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Thu, 18 Jun 2020 11:37:31 +0400 Subject: Fixed "object-curly-newline" Signed-off-by: Valentin Popov --- src/rules/javascript/default.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/rules') diff --git a/src/rules/javascript/default.json b/src/rules/javascript/default.json index 34e1d8f..0ec323c 100644 --- a/src/rules/javascript/default.json +++ b/src/rules/javascript/default.json @@ -454,18 +454,18 @@ { "ExportDeclaration": { "consistent": true, - "minProperties": 1, + "minProperties": 5, "multiline": true }, "ImportDeclaration": "never", "ObjectExpression": { "consistent": true, - "minProperties": 1, + "minProperties": 5, "multiline": true }, "ObjectPattern": { "consistent": true, - "minProperties": 1, + "minProperties": 5, "multiline": true } } @@ -638,4 +638,4 @@ "onlyEquality": false } ] -} \ No newline at end of file +} -- cgit v1.2.3 From f6868cf9b6ffb583313a7c62526688064ee64d05 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Thu, 18 Jun 2020 11:47:07 +0400 Subject: Added react-hooks rules Signed-off-by: Valentin Popov --- docs/roadmap/react-hooks.md | 4 ++-- src/rules/react-hooks/default.json | 9 ++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) (limited to 'src/rules') diff --git a/docs/roadmap/react-hooks.md b/docs/roadmap/react-hooks.md index 2e651d4..49d99cc 100644 --- a/docs/roadmap/react-hooks.md +++ b/docs/roadmap/react-hooks.md @@ -1,4 +1,4 @@ # React Hooks -- [ ] "exhaustive-deps" -- [ ] "rules-of-hooks" +- [X] "exhaustive-deps" +- [X] "rules-of-hooks" diff --git a/src/rules/react-hooks/default.json b/src/rules/react-hooks/default.json index 0967ef4..4276d63 100644 --- a/src/rules/react-hooks/default.json +++ b/src/rules/react-hooks/default.json @@ -1 +1,8 @@ -{} +{ + "react-hooks/exhaustive-deps": [ + "warn" + ], + "react-hooks/rules-of-hooks": [ + "error" + ] +} \ No newline at end of file -- 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 'src/rules') 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 From 65d843d5c2fb9ad9939a7cc94897d389ef492670 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Thu, 18 Jun 2020 12:07:33 +0400 Subject: Corrected TypeScript rules Signed-off-by: Valentin Popov --- src/rules/typescript/default.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/rules') diff --git a/src/rules/typescript/default.json b/src/rules/typescript/default.json index f65f761..52da311 100644 --- a/src/rules/typescript/default.json +++ b/src/rules/typescript/default.json @@ -133,7 +133,7 @@ "error" ], "@typescript-eslint/no-unsafe-member-access": [ - "error" + "warn" ], "@typescript-eslint/no-unsafe-return": [ "error" @@ -167,7 +167,7 @@ "error" ], "@typescript-eslint/prefer-readonly-parameter-types": [ - "error", + "warn", { "checkParameterProperties": true } -- cgit v1.2.3 From 700b1ff70454d4fdc0b4d8bb0d1c1d867cf4db01 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Tue, 23 Jun 2020 00:59:40 +0400 Subject: Fixed "@typescript-eslint/typedef" Signed-off-by: Valentin Popov --- src/rules/typescript/default.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/rules') diff --git a/src/rules/typescript/default.json b/src/rules/typescript/default.json index 52da311..93a83aa 100644 --- a/src/rules/typescript/default.json +++ b/src/rules/typescript/default.json @@ -252,7 +252,7 @@ "objectDestructuring": true, "parameter": true, "propertyDeclaration": true, - "variableDeclaration": true, + "variableDeclaration": false, "variableDeclarationIgnoreFunction": false } ], @@ -289,4 +289,4 @@ "space-before-function-paren": [ "off" ] -} \ No newline at end of file +} -- cgit v1.2.3 From 0112b8616e3d103e943d32ea30675a51d400e96e Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Tue, 23 Jun 2020 01:05:55 +0400 Subject: Fixed "@typescript-eslint/typedef" Signed-off-by: Valentin Popov --- src/rules/typescript/default.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/rules') diff --git a/src/rules/typescript/default.json b/src/rules/typescript/default.json index 93a83aa..b4fcc7a 100644 --- a/src/rules/typescript/default.json +++ b/src/rules/typescript/default.json @@ -249,7 +249,7 @@ "arrayDestructuring": true, "arrowParameter": true, "memberVariableDeclaration": true, - "objectDestructuring": true, + "objectDestructuring": false, "parameter": true, "propertyDeclaration": true, "variableDeclaration": false, -- cgit v1.2.3