From 802224efd3eabc428f4d91d6e21c19fc0b7f9db1 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Wed, 17 Jun 2020 21:30:15 +0400 Subject: Updated TypeScript rules Signed-off-by: Valentin Popov --- ROADMAP.md | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'ROADMAP.md') diff --git a/ROADMAP.md b/ROADMAP.md index d16e2bb..dcc2822 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -385,29 +385,30 @@ - [ ] "array-type" - [X] "await-thenable" - [ ] "ban-ts-comment" -- [ ] "ban-ts-ignore" +- [ ] "ban-tslint-comment" - [ ] "ban-types" - [ ] "brace-style" -- [ ] "camelcase" - [X] "class-literal-property-style" -- [ ] "class-name-casing" - [X] "comma-spacing" - [ ] "consistent-type-assertions" - [ ] "consistent-type-definitions" - [ ] "default-param-last" +- [ ] "dot-notation" - [X] "explicit-function-return-type" - [X] "explicit-member-accessibility" - [ ] "explicit-module-boundary-types" - [ ] "func-call-spacing" -- [ ] "generic-type-naming" - [X] "indent" -- [X] "interface-name-prefix" +- [ ] "init-declarations" +- [ ] "keyword-spacing" +- [ ] "lines-between-class-members" - [ ] "member-delimiter-style" -- [ ] "member-naming" - [ ] "member-ordering" +- [X] "method-signature-style" - [ ] "naming-convention" - [ ] "no-array-constructor" - [X] "no-base-to-string" +- [ ] "no-confusing-non-null-assertion" - [ ] "no-dupe-class-members" - [ ] "no-dynamic-delete" - [ ] "no-empty-function" @@ -421,6 +422,8 @@ - [ ] "no-for-in-array" - [X] "no-implied-eval" - [X] "no-inferrable-types" +- [ ] "no-invalid-this" +- [ ] "no-invalid-void-type" - [X] "no-magic-numbers" - [ ] "no-misused-new" - [X] "no-misused-promises" @@ -437,6 +440,7 @@ - [ ] "no-unnecessary-qualifier" - [ ] "no-unnecessary-type-arguments" - [X] "no-unnecessary-type-assertion" +- [ ] "no-unsafe-assignment" - [X] "no-unsafe-call" - [X] "no-unsafe-member-access" - [X] "no-unsafe-return" @@ -456,8 +460,10 @@ - [ ] "prefer-optional-chain" - [ ] "prefer-readonly" - [X] "prefer-readonly-parameter-types" +- [ ] "prefer-reduce-type-parameter" - [ ] "prefer-regexp-exec" - [ ] "prefer-string-starts-ends-with" +- [ ] "prefer-ts-expect-error" - [ ] "promise-function-async" - [X] "quotes" - [ ] "require-array-sort-compare" -- cgit v1.2.3 From 7f69fc6b1ee0ef43244785b4319dd53751ad74af Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Thu, 18 Jun 2020 00:20:56 +0400 Subject: Updated ESLint rules Signed-off-by: Valentin Popov --- ROADMAP.md | 11 +- package-lock.json | 283 ++++++++++++++++++-------------------- package.json | 8 +- src/rules/javascript/default.json | 44 +++--- 4 files changed, 159 insertions(+), 187 deletions(-) (limited to 'ROADMAP.md') diff --git a/ROADMAP.md b/ROADMAP.md index dcc2822..ca63bad 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -13,7 +13,6 @@ - [ ] "block-scoped-var" - [ ] "block-spacing" - [X] "brace-style" -- [X] "callback-return" - [X] "camelcase" - [ ] "capitalized-comments" - [X] "class-methods-use-this" @@ -42,10 +41,8 @@ - [ ] "function-paren-newline" - [ ] "generator-star-spacing" - [ ] "getter-return" -- [ ] "global-require" - [ ] "grouped-accessor-pairs" - [ ] "guard-for-in" -- [X] "handle-callback-err" - [ ] "id-blacklist" - [X] "id-length" - [ ] "id-match" @@ -138,10 +135,10 @@ - [X] "no-lone-blocks" - [ ] "no-lonely-if" - [ ] "no-loop-func" +- [ ] "no-loss-of-precision" - [X] "no-magic-numbers" - [ ] "no-misleading-character-class" - [ ] "no-mixed-operators" -- [ ] "no-mixed-requires" - [X] "no-mixed-spaces-and-tabs" - [ ] "no-multi-assign" - [X] "no-multi-spaces" @@ -154,17 +151,13 @@ - [ ] "no-new" - [X] "no-new-func" - [ ] "no-new-object" -- [X] "no-new-require" - [ ] "no-new-symbol" - [X] "no-new-wrappers" - [ ] "no-obj-calls" - [ ] "no-octal" - [X] "no-octal-escape" - [ ] "no-param-reassign" -- [X] "no-path-concat" - [ ] "no-plusplus" -- [X] "no-process-env" -- [ ] "no-process-exit" - [X] "no-proto" - [ ] "no-prototype-builtins" - [ ] "no-redeclare" @@ -172,7 +165,6 @@ - [ ] "no-restricted-exports" - [ ] "no-restricted-globals" - [ ] "no-restricted-imports" -- [ ] "no-restricted-modules" - [X] "no-restricted-properties" - [ ] "no-restricted-syntax" - [ ] "no-return-assign" @@ -186,7 +178,6 @@ - [ ] "no-shadow-restricted-names" - [X] "no-spaced-func" - [ ] "no-sparse-arrays" -- [ ] "no-sync" - [X] "no-tabs" - [ ] "no-template-curly-in-string" - [X] "no-ternary" diff --git a/package-lock.json b/package-lock.json index 718b7ec..1b805d9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -128,44 +128,15 @@ } }, "@typescript-eslint/parser": { - "version": "2.34.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.34.0.tgz", - "integrity": "sha512-03ilO0ucSD0EPTw2X4PntSIRFtDPWjrVq7C3/Z3VQHRC7+13YB55rcJI3Jt+YgeHbjUdJPcPa7b23rXCBokuyA==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-3.3.0.tgz", + "integrity": "sha512-a7S0Sqn/+RpOOWTcaLw6RD4obsharzxmgMfdK24l364VxuBODXjuJM7ImCkSXEN7oz52aiZbXSbc76+2EsE91w==", "dev": true, "requires": { "@types/eslint-visitor-keys": "^1.0.0", - "@typescript-eslint/experimental-utils": "2.34.0", - "@typescript-eslint/typescript-estree": "2.34.0", + "@typescript-eslint/experimental-utils": "3.3.0", + "@typescript-eslint/typescript-estree": "3.3.0", "eslint-visitor-keys": "^1.1.0" - }, - "dependencies": { - "@typescript-eslint/experimental-utils": { - "version": "2.34.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.34.0.tgz", - "integrity": "sha512-eS6FTkq+wuMJ+sgtuNTtcqavWXqsflWcfBnlYhg/nS4aZ1leewkXGbvBhaapn1q6qf4M71bsR1tez5JTRMuqwA==", - "dev": true, - "requires": { - "@types/json-schema": "^7.0.3", - "@typescript-eslint/typescript-estree": "2.34.0", - "eslint-scope": "^5.0.0", - "eslint-utils": "^2.0.0" - } - }, - "@typescript-eslint/typescript-estree": { - "version": "2.34.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.34.0.tgz", - "integrity": "sha512-OMAr+nJWKdlVM9LOqCqh3pQQPwxHAN7Du8DR6dmwCrAmxtiXQnhHJ6tBNtf+cggqfo51SG/FCwnKhXCIM7hnVg==", - "dev": true, - "requires": { - "debug": "^4.1.1", - "eslint-visitor-keys": "^1.1.0", - "glob": "^7.1.6", - "is-glob": "^4.0.1", - "lodash": "^4.17.15", - "semver": "^7.3.2", - "tsutils": "^3.17.1" - } - } } }, "@typescript-eslint/typescript-estree": { @@ -384,24 +355,14 @@ "dev": true }, "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" } }, "debug": { @@ -489,22 +450,22 @@ "dev": true }, "eslint": { - "version": "6.8.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.8.0.tgz", - "integrity": "sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.2.0.tgz", + "integrity": "sha512-B3BtEyaDKC5MlfDa2Ha8/D6DsS4fju95zs0hjS3HdGazw+LNayai38A25qMppK37wWGWNYSPOR6oYzlz5MHsRQ==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", "ajv": "^6.10.0", - "chalk": "^2.1.0", - "cross-spawn": "^6.0.5", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", "debug": "^4.0.1", "doctrine": "^3.0.0", - "eslint-scope": "^5.0.0", - "eslint-utils": "^1.4.3", - "eslint-visitor-keys": "^1.1.0", - "espree": "^6.1.2", - "esquery": "^1.0.1", + "eslint-scope": "^5.1.0", + "eslint-utils": "^2.0.0", + "eslint-visitor-keys": "^1.2.0", + "espree": "^7.1.0", + "esquery": "^1.2.0", "esutils": "^2.0.2", "file-entry-cache": "^5.0.1", "functional-red-black-tree": "^1.0.1", @@ -517,42 +478,81 @@ "is-glob": "^4.0.0", "js-yaml": "^3.13.1", "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.3.0", + "levn": "^0.4.1", "lodash": "^4.17.14", "minimatch": "^3.0.4", - "mkdirp": "^0.5.1", "natural-compare": "^1.4.0", - "optionator": "^0.8.3", + "optionator": "^0.9.1", "progress": "^2.0.0", - "regexpp": "^2.0.1", - "semver": "^6.1.2", - "strip-ansi": "^5.2.0", - "strip-json-comments": "^3.0.1", + "regexpp": "^3.1.0", + "semver": "^7.2.1", + "strip-ansi": "^6.0.0", + "strip-json-comments": "^3.1.0", "table": "^5.2.3", "text-table": "^0.2.0", "v8-compile-cache": "^2.0.3" }, "dependencies": { - "eslint-utils": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz", - "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==", + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", "dev": true, "requires": { - "eslint-visitor-keys": "^1.1.0" + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" } }, - "regexpp": { + "chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", - "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "espree": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-7.1.0.tgz", + "integrity": "sha512-dcorZSyfmm4WTuTnE5Y7MEN1DyoPYy1ZR783QW1FJoenn7RailyWFsq/UL6ZAAA7uXurN9FIpYyUs3OfiIW+Qw==", + "dev": true, + "requires": { + "acorn": "^7.2.0", + "acorn-jsx": "^5.2.0", + "eslint-visitor-keys": "^1.2.0" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true + }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } } } }, @@ -1210,15 +1210,6 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.0" - } - }, "supports-color": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", @@ -1376,13 +1367,13 @@ } }, "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" } }, "lines-and-columns": { @@ -1491,12 +1482,6 @@ "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", "dev": true }, - "nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", - "dev": true - }, "normalize-package-data": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", @@ -1572,17 +1557,17 @@ } }, "optionator": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", - "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", "dev": true, "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" } }, "os-tmpdir": { @@ -1646,9 +1631,9 @@ "dev": true }, "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true }, "path-parse": { @@ -1688,9 +1673,9 @@ } }, "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true }, "progress": { @@ -1871,18 +1856,18 @@ } }, "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, "requires": { - "shebang-regex": "^1.0.0" + "shebang-regex": "^3.0.0" } }, "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true }, "signal-exit": { @@ -1973,17 +1958,6 @@ "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.0" - }, - "dependencies": { - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.0" - } - } } }, "string.prototype.trimend": { @@ -2007,20 +1981,12 @@ } }, "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", "dev": true, "requires": { - "ansi-regex": "^4.1.0" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - } + "ansi-regex": "^5.0.0" } }, "strip-bom": { @@ -2056,6 +2022,12 @@ "string-width": "^3.0.0" }, "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, "emoji-regex": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", @@ -2078,6 +2050,15 @@ "is-fullwidth-code-point": "^2.0.0", "strip-ansi": "^5.1.0" } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } } } }, @@ -2149,12 +2130,12 @@ } }, "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "dev": true, "requires": { - "prelude-ls": "~1.1.2" + "prelude-ls": "^1.2.1" } }, "type-fest": { @@ -2209,9 +2190,9 @@ } }, "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, "requires": { "isexe": "^2.0.0" diff --git a/package.json b/package.json index f5f00a1..a740a2f 100644 --- a/package.json +++ b/package.json @@ -15,8 +15,8 @@ "@rollup/plugin-typescript": "^4.1.2", "@types/node": "^14.0.13", "@typescript-eslint/eslint-plugin": "^3.3.0", - "@typescript-eslint/parser": "^2.34.0", - "eslint": "^6.8.0", + "@typescript-eslint/parser": "^3.3.0", + "eslint": "^7.2.0", "eslint-plugin-eslint-comments": "^3.1.2", "eslint-plugin-import": "^2.20.2", "eslint-plugin-security": "^1.4.0", @@ -30,8 +30,8 @@ }, "peerDependencies": { "@typescript-eslint/eslint-plugin": "^3.3.0", - "@typescript-eslint/parser": "^2.34.0", - "eslint": "^6.8.0", + "@typescript-eslint/parser": "^3.3.0", + "eslint": "^7.2.0", "eslint-plugin-eslint-comments": "^3.1.2", "eslint-plugin-import": "^2.20.2", "eslint-plugin-security": "^1.4.0", diff --git a/src/rules/javascript/default.json b/src/rules/javascript/default.json index 3014de5..3bc17cc 100644 --- a/src/rules/javascript/default.json +++ b/src/rules/javascript/default.json @@ -2,7 +2,8 @@ "array-callback-return": [ "error", { - "allowImplicit": false + "allowImplicit": false, + "checkForEach": true } ], "arrow-parens": [ @@ -23,9 +24,6 @@ "allowSingleLine": false } ], - "callback-return": [ - "warn" - ], "camelcase": [ "error", { @@ -53,10 +51,7 @@ ], "comma-style": [ "error", - "last", - { - "exceptions": {} - } + "last" ], "curly": [ "error", @@ -80,9 +75,6 @@ "error", "consistent" ], - "handle-callback-err": [ - "error" - ], "id-length": [ "warn", { @@ -115,6 +107,7 @@ "flatTernaryExpressions": true, "ignoreComments": false, "ignoredNodes": [], + "offsetTernaryExpressions": 1, "outerIIFEBody": 1 } ], @@ -330,9 +323,6 @@ "no-new-func": [ "error" ], - "no-new-require": [ - "error" - ], "no-new-wrappers": [ "error" ], @@ -345,12 +335,6 @@ "props": true } ], - "no-path-concat": [ - "error" - ], - "no-process-env": [ - "off" - ], "no-proto": [ "error" ], @@ -469,8 +453,24 @@ "object-curly-newline": [ "error", { + "ExportDeclaration": { + "consistent": true, + "minProperties": 1, + "multiline": true + }, + "ImportDeclaration": "never", + "ObjectExpression": { + "consistent": true, + "minProperties": 1, + "multiline": true + }, + "ObjectPattern": { + "consistent": true, + "minProperties": 1, + "multiline": true + }, "consistent": true, - "minProperties": 5, + "minProperties": 1, "multiline": true } ], @@ -642,4 +642,4 @@ "onlyEquality": false } ] -} +} \ No newline at end of file -- cgit v1.2.3 From 10507bf4d5bd94fe14949fe34c91d73aa4e43a6a Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Thu, 18 Jun 2020 00:47:04 +0400 Subject: Updated plugin rules Signed-off-by: Valentin Popov --- ROADMAP.md | 7 +++++++ package-lock.json | 62 ++++++++++++++++++++++++++++++++----------------------- package.json | 12 +++++------ 3 files changed, 49 insertions(+), 32 deletions(-) (limited to 'ROADMAP.md') diff --git a/ROADMAP.md b/ROADMAP.md index ca63bad..f671ba7 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -282,6 +282,7 @@ - [X] "no-unused-disable" - [X] "no-unused-enable" - [X] "no-use" +- [ ] "require-description" ## Import @@ -494,13 +495,17 @@ - [ ] "no-keyword-prefix" - [ ] "no-nested-ternary" - [ ] "no-new-buffer" +- [ ] "no-null" - [ ] "no-process-exit" +- [ ] "no-reduce" - [ ] "no-unreadable-array-destructuring" - [ ] "no-unsafe-regex" - [ ] "no-unused-properties" +- [ ] "no-useless-undefined" - [ ] "no-zero-fractions" - [ ] "number-literal-case" - [ ] "prefer-add-event-listener" +- [ ] "prefer-array-find" - [ ] "prefer-dataset" - [ ] "prefer-event-key" - [ ] "prefer-exponentiation-operator" @@ -511,6 +516,7 @@ - [ ] "prefer-node-append" - [ ] "prefer-node-remove" - [X] "prefer-number-properties" +- [ ] "prefer-optional-catch-binding" - [ ] "prefer-query-selector" - [ ] "prefer-reflect-apply" - [ ] "prefer-replace-all" @@ -522,6 +528,7 @@ - [ ] "prefer-trim-start-end" - [ ] "prefer-type-error" - [X] "prevent-abbreviations" +- [ ] "string-content" - [ ] "throw-new-error" ## Vue diff --git a/package-lock.json b/package-lock.json index 1b805d9..ef9feed 100644 --- a/package-lock.json +++ b/package-lock.json @@ -528,17 +528,6 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, - "espree": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-7.1.0.tgz", - "integrity": "sha512-dcorZSyfmm4WTuTnE5Y7MEN1DyoPYy1ZR783QW1FJoenn7RailyWFsq/UL6ZAAA7uXurN9FIpYyUs3OfiIW+Qw==", - "dev": true, - "requires": { - "acorn": "^7.2.0", - "acorn-jsx": "^5.2.0", - "eslint-visitor-keys": "^1.2.0" - } - }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -702,22 +691,24 @@ "dev": true }, "eslint-plugin-unicorn": { - "version": "18.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-18.0.1.tgz", - "integrity": "sha512-Y4bgygek4x4ogeMcSHr6MZi3frBPZ80eIpMOsxew7jAblb53OYflpRh0an62Z6jv/fw7D3TkXauqLOBWbT9adg==", + "version": "20.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-20.1.0.tgz", + "integrity": "sha512-XQxLBJT/gnwyRR6cfYsIK1AdekQchAt5tmcsnldevGjgR2xoZsRUa5/i6e0seNHy2RoT57CkTnbVHwHF8No8LA==", "dev": true, "requires": { "ci-info": "^2.0.0", "clean-regexp": "^1.0.0", "eslint-ast-utils": "^1.1.0", - "eslint-template-visitor": "^1.1.0", + "eslint-template-visitor": "^2.0.0", + "eslint-utils": "^2.0.0", "import-modules": "^2.0.0", "lodash": "^4.17.15", + "pluralize": "^8.0.0", "read-pkg-up": "^7.0.1", "regexp-tree": "^0.1.21", "reserved-words": "^0.1.2", "safe-regex": "^2.1.1", - "semver": "^7.1.3" + "semver": "^7.3.2" }, "dependencies": { "find-up": { @@ -853,14 +844,14 @@ } }, "eslint-template-visitor": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/eslint-template-visitor/-/eslint-template-visitor-1.1.0.tgz", - "integrity": "sha512-Lmy6QVlmFiIGl5fPi+8ACnov3sare+0Ouf7deJAGGhmUfeWJ5fVarELUxZRpsZ9sHejiJUq8626d0dn9uvcZTw==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/eslint-template-visitor/-/eslint-template-visitor-2.0.0.tgz", + "integrity": "sha512-WijrLXWk/TiiG9FBTeEeb2pj/nD8H4eKIYx1DhTv/c7QoFmelE5P+3gzKUcXWZz88AI2+Wjse9DTV8lXrhcUsw==", "dev": true, "requires": { "eslint-visitor-keys": "^1.1.0", - "espree": "^6.1.1", - "multimap": "^1.0.2" + "espree": "^7.0.0", + "multimap": "^1.1.0" } }, "eslint-utils": { @@ -879,14 +870,14 @@ "dev": true }, "espree": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-6.2.1.tgz", - "integrity": "sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-7.1.0.tgz", + "integrity": "sha512-dcorZSyfmm4WTuTnE5Y7MEN1DyoPYy1ZR783QW1FJoenn7RailyWFsq/UL6ZAAA7uXurN9FIpYyUs3OfiIW+Qw==", "dev": true, "requires": { - "acorn": "^7.1.1", + "acorn": "^7.2.0", "acorn-jsx": "^5.2.0", - "eslint-visitor-keys": "^1.1.0" + "eslint-visitor-keys": "^1.2.0" } }, "esprima": { @@ -1672,6 +1663,12 @@ "find-up": "^2.1.0" } }, + "pluralize": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", + "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", + "dev": true + }, "prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -2187,6 +2184,19 @@ "espree": "^6.2.1", "esquery": "^1.0.1", "lodash": "^4.17.15" + }, + "dependencies": { + "espree": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-6.2.1.tgz", + "integrity": "sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==", + "dev": true, + "requires": { + "acorn": "^7.1.1", + "acorn-jsx": "^5.2.0", + "eslint-visitor-keys": "^1.1.0" + } + } } }, "which": { diff --git a/package.json b/package.json index a740a2f..17cfa4d 100644 --- a/package.json +++ b/package.json @@ -17,11 +17,11 @@ "@typescript-eslint/eslint-plugin": "^3.3.0", "@typescript-eslint/parser": "^3.3.0", "eslint": "^7.2.0", - "eslint-plugin-eslint-comments": "^3.1.2", - "eslint-plugin-import": "^2.20.2", + "eslint-plugin-eslint-comments": "^3.2.0", + "eslint-plugin-import": "^2.21.2", "eslint-plugin-security": "^1.4.0", "eslint-plugin-sonarjs": "^0.5.0", - "eslint-plugin-unicorn": "^18.0.1", + "eslint-plugin-unicorn": "^20.1.0", "eslint-plugin-vue": "^6.2.2", "rollup": "^2.16.1", "rollup-plugin-terser": "^6.1.0", @@ -32,11 +32,11 @@ "@typescript-eslint/eslint-plugin": "^3.3.0", "@typescript-eslint/parser": "^3.3.0", "eslint": "^7.2.0", - "eslint-plugin-eslint-comments": "^3.1.2", - "eslint-plugin-import": "^2.20.2", + "eslint-plugin-eslint-comments": "^3.2.0", + "eslint-plugin-import": "^2.21.2", "eslint-plugin-security": "^1.4.0", "eslint-plugin-sonarjs": "^0.5.0", - "eslint-plugin-unicorn": "^18.0.1", + "eslint-plugin-unicorn": "^20.1.0", "eslint-plugin-vue": "^6.2.2" }, "dependencies": {} -- cgit v1.2.3 From 14cecabc106a9cf8e4f34ecb114fd26edd4c92f6 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Thu, 18 Jun 2020 01:02:06 +0400 Subject: Fixed rules Signed-off-by: Valentin Popov --- ROADMAP.md | 3 ++- src/rules/javascript/default.json | 8 ++------ src/rules/typescript/default.json | 8 -------- 3 files changed, 4 insertions(+), 15 deletions(-) (limited to 'ROADMAP.md') diff --git a/ROADMAP.md b/ROADMAP.md index f671ba7..e7e9612 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -308,6 +308,7 @@ - [ ] "no-dynamic-require" - [ ] "no-extraneous-dependencies" - [ ] "no-internal-modules" +- [ ] "no-loss-of-precision" - [ ] "no-mutable-exports" - [ ] "no-named-as-default" - [ ] "no-named-as-default-member" @@ -380,6 +381,7 @@ - [ ] "ban-tslint-comment" - [ ] "ban-types" - [ ] "brace-style" +- [ ] "camelcase" - [X] "class-literal-property-style" - [X] "comma-spacing" - [ ] "consistent-type-assertions" @@ -436,7 +438,6 @@ - [X] "no-unsafe-call" - [X] "no-unsafe-member-access" - [X] "no-unsafe-return" -- [X] "no-untyped-public-signature" - [ ] "no-unused-expressions" - [X] "no-unused-vars" - [X] "no-unused-vars-experimental" diff --git a/src/rules/javascript/default.json b/src/rules/javascript/default.json index 3bc17cc..34e1d8f 100644 --- a/src/rules/javascript/default.json +++ b/src/rules/javascript/default.json @@ -106,8 +106,7 @@ "VariableDeclarator": 1, "flatTernaryExpressions": true, "ignoreComments": false, - "ignoredNodes": [], - "offsetTernaryExpressions": 1, + "offsetTernaryExpressions": true, "outerIIFEBody": 1 } ], @@ -468,10 +467,7 @@ "consistent": true, "minProperties": 1, "multiline": true - }, - "consistent": true, - "minProperties": 1, - "multiline": true + } } ], "object-curly-spacing": [ diff --git a/src/rules/typescript/default.json b/src/rules/typescript/default.json index fa868f6..f65f761 100644 --- a/src/rules/typescript/default.json +++ b/src/rules/typescript/default.json @@ -138,14 +138,6 @@ "@typescript-eslint/no-unsafe-return": [ "error" ], - "@typescript-eslint/no-untyped-public-signature": [ - "warn", - { - "ignoredMethods": [ - "constructor" - ] - } - ], "@typescript-eslint/no-unused-vars": [ "error", { -- cgit v1.2.3