From e1d78952837dda1e0741ef72d2d61fa44c0ed005 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Wed, 17 Jun 2020 20:42:58 +0400 Subject: Updated TypeScript dependence Signed-off-by: Valentin Popov --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'package.json') diff --git a/package.json b/package.json index febb7ca..79aa220 100644 --- a/package.json +++ b/package.json @@ -24,8 +24,8 @@ "eslint-plugin-vue": "^6.2.2", "rollup": "^1.31.1", "rollup-plugin-terser": "^5.2.0", - "tslib": "^1.10.0", - "typescript": "^3.7.5" + "tslib": "^2.0.0", + "typescript": "^3.9.5" }, "peerDependencies": { "@typescript-eslint/eslint-plugin": "^2.26.0", -- cgit v1.2.3 From 2c62da8decad63e1ee4b4cbc1e5ac88e42032594 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Wed, 17 Jun 2020 20:44:45 +0400 Subject: Updated RollUp dependence Signed-off-by: Valentin Popov --- package-lock.json | 105 ++++++++++++++++++++++++++---------------------------- package.json | 8 ++--- 2 files changed, 54 insertions(+), 59 deletions(-) (limited to 'package.json') diff --git a/package-lock.json b/package-lock.json index bedd63e..88af739 100644 --- a/package-lock.json +++ b/package-lock.json @@ -40,9 +40,9 @@ } }, "@rollup/plugin-typescript": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-3.1.1.tgz", - "integrity": "sha512-VPY1MbzIJT+obpav9Kns4MlipVJ1FuefwzO4s1uCVXAzVWya+bhhNauOmmqR/hy1zj7tePfh3t9iBN+HbIzyRA==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-4.1.2.tgz", + "integrity": "sha512-+7UlGat/99e2JbmGNnIauxwEhYLwrL7adO/tSJxUN57xrrS3Ps+ZzYpLCDGPZJ57j+ZJTZLLN89KXW9JMEB+jg==", "dev": true, "requires": { "@rollup/pluginutils": "^3.0.1", @@ -90,12 +90,6 @@ "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", "dev": true }, - "@types/node": { - "version": "14.0.13", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.0.13.tgz", - "integrity": "sha512-rouEWBImiRaSJsVA+ITTFM6ZxibuAlTuNOCyxVbwreu6k6+ujs7DfnU9o+PShFhET78pMBl3eH+AGSI5eOTkPA==", - "dev": true - }, "@types/normalize-package-data": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz", @@ -1276,22 +1270,28 @@ "dev": true }, "jest-worker": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-24.9.0.tgz", - "integrity": "sha512-51PE4haMSXcHohnSMdM42anbvZANYTqMrr52tVKPqqsPJMzoP6FYYDVqahX/HrAoKEKz3uUPzSvKs9A3qR4iVw==", + "version": "26.0.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.0.0.tgz", + "integrity": "sha512-pPaYa2+JnwmiZjK9x7p9BoZht+47ecFCDFA/CJxspHzeDvQcfVBLWzCiWyo+EGrSiQMWZtCFo9iSvMZnAAo8vw==", "dev": true, "requires": { "merge-stream": "^2.0.0", - "supports-color": "^6.1.0" + "supports-color": "^7.0.0" }, "dependencies": { + "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": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "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": "^3.0.0" + "has-flag": "^4.0.0" } } } @@ -1669,6 +1669,15 @@ "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true }, + "randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "requires": { + "safe-buffer": "^5.1.0" + } + }, "read-pkg": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", @@ -1749,44 +1758,21 @@ } }, "rollup": { - "version": "1.32.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-1.32.1.tgz", - "integrity": "sha512-/2HA0Ec70TvQnXdzynFffkjA6XN+1e2pEv/uKS5Ulca40g2L7KuOE3riasHoNVHOsFD5KKZgDsMk1CP3Tw9s+A==", - "dev": true, - "requires": { - "@types/estree": "*", - "@types/node": "*", - "acorn": "^7.1.0" - } + "version": "2.16.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.16.1.tgz", + "integrity": "sha512-UYupMcbFtoWLB6ZtL4hPZNUTlkXjJfGT33Mmhz3hYLNmRj/cOvX2B26ZxDQuEpwtLdcyyyraBGQ7EfzmMJnXXg==", + "dev": true }, "rollup-plugin-terser": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-5.3.0.tgz", - "integrity": "sha512-XGMJihTIO3eIBsVGq7jiNYOdDMb3pVxuzY0uhOE/FM4x/u9nQgr3+McsjzqBn3QfHIpNSZmFnpoKAwHBEcsT7g==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-6.1.0.tgz", + "integrity": "sha512-4fB3M9nuoWxrwm39habpd4hvrbrde2W2GG4zEGPQg1YITNkM3Tqur5jSuXlWNzbv/2aMLJ+dZJaySc3GCD8oDw==", "dev": true, "requires": { - "@babel/code-frame": "^7.5.5", - "jest-worker": "^24.9.0", - "rollup-pluginutils": "^2.8.2", - "serialize-javascript": "^2.1.2", - "terser": "^4.6.2" - } - }, - "rollup-pluginutils": { - "version": "2.8.2", - "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz", - "integrity": "sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==", - "dev": true, - "requires": { - "estree-walker": "^0.6.1" - }, - "dependencies": { - "estree-walker": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz", - "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==", - "dev": true - } + "@babel/code-frame": "^7.8.3", + "jest-worker": "^26.0.0", + "serialize-javascript": "^3.0.0", + "terser": "^4.7.0" } }, "run-async": { @@ -1812,6 +1798,12 @@ } } }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true + }, "safe-regex": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", @@ -1834,10 +1826,13 @@ "dev": true }, "serialize-javascript": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-2.1.2.tgz", - "integrity": "sha512-rs9OggEUF0V4jUSecXazOYsLfu7OGK2qIn3c7IPBiffz32XniEp/TX9Xmc9LQfK2nQ2QKHvZ2oygKUGU0lG4jQ==", - "dev": true + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-3.1.0.tgz", + "integrity": "sha512-JIJT1DGiWmIKhzRsG91aS6Ze4sFUrYbltlkg2onR5OrnNM02Kl/hnY/T4FN2omvyeBbQmMJv+K4cPOpGzOTFBg==", + "dev": true, + "requires": { + "randombytes": "^2.1.0" + } }, "shebang-command": { "version": "1.2.0", diff --git a/package.json b/package.json index 79aa220..6ecf7d1 100644 --- a/package.json +++ b/package.json @@ -11,8 +11,8 @@ "build": "rollup --config rollup.config.js" }, "devDependencies": { - "@rollup/plugin-json": "^4.0.2", - "@rollup/plugin-typescript": "^3.0.0", + "@rollup/plugin-json": "^4.1.0", + "@rollup/plugin-typescript": "^4.1.2", "@typescript-eslint/eslint-plugin": "^2.26.0", "@typescript-eslint/parser": "^2.26.0", "eslint": "^6.8.0", @@ -22,8 +22,8 @@ "eslint-plugin-sonarjs": "^0.5.0", "eslint-plugin-unicorn": "^18.0.1", "eslint-plugin-vue": "^6.2.2", - "rollup": "^1.31.1", - "rollup-plugin-terser": "^5.2.0", + "rollup": "^2.16.1", + "rollup-plugin-terser": "^6.1.0", "tslib": "^2.0.0", "typescript": "^3.9.5" }, -- cgit v1.2.3 From 65cf95c441aaf9789e00ad68ba0b5fd2bbda4501 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Wed, 17 Jun 2020 20:49:00 +0400 Subject: Recovered build Signed-off-by: Valentin Popov --- .gitignore | 8 ++------ package-lock.json | 6 ++++++ package.json | 1 + rollup.config.js | 3 +-- 4 files changed, 10 insertions(+), 8 deletions(-) (limited to 'package.json') diff --git a/.gitignore b/.gitignore index 232ea35..507d360 100644 --- a/.gitignore +++ b/.gitignore @@ -198,9 +198,5 @@ $RECYCLE.BIN/ ### Project ### # Resulting code -/_tslib-*.js -/default-*.js -/javascript.js -/typescript.js -/vue-javascript.js -/vue-typescript.js +/*.js + diff --git a/package-lock.json b/package-lock.json index 88af739..88bd254 100644 --- a/package-lock.json +++ b/package-lock.json @@ -90,6 +90,12 @@ "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", "dev": true }, + "@types/node": { + "version": "14.0.13", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.0.13.tgz", + "integrity": "sha512-rouEWBImiRaSJsVA+ITTFM6ZxibuAlTuNOCyxVbwreu6k6+ujs7DfnU9o+PShFhET78pMBl3eH+AGSI5eOTkPA==", + "dev": true + }, "@types/normalize-package-data": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz", diff --git a/package.json b/package.json index 6ecf7d1..2471197 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "devDependencies": { "@rollup/plugin-json": "^4.1.0", "@rollup/plugin-typescript": "^4.1.2", + "@types/node": "^14.0.13", "@typescript-eslint/eslint-plugin": "^2.26.0", "@typescript-eslint/parser": "^2.26.0", "eslint": "^6.8.0", diff --git a/rollup.config.js b/rollup.config.js index d22bb39..4f5794e 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,6 +1,6 @@ -import { terser } from "rollup-plugin-terser"; import json from "@rollup/plugin-json"; import typescript from "@rollup/plugin-typescript"; +import { terser } from "rollup-plugin-terser"; module.exports = { input: { @@ -25,7 +25,6 @@ module.exports = { output: { comments: false, }, - sourcemap: false, }), ], }; -- cgit v1.2.3 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 +++++++++----- package-lock.json | 52 ++++++++++++++++++++++++++++++--------- package.json | 8 +++--- src/rules/typescript/default.json | 24 +++++++++--------- src/typescript.ts | 1 - 5 files changed, 69 insertions(+), 34 deletions(-) (limited to 'package.json') 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" diff --git a/package-lock.json b/package-lock.json index 88bd254..718b7ec 100644 --- a/package-lock.json +++ b/package-lock.json @@ -103,25 +103,26 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "2.34.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.34.0.tgz", - "integrity": "sha512-4zY3Z88rEE99+CNvTbXSyovv2z9PNOVffTWD2W8QF5s2prBQtwN2zadqERcrHpcR7O/+KMI3fcTAmUUhK/iQcQ==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-3.3.0.tgz", + "integrity": "sha512-Ybx/wU75Tazz6nU2d7nN6ll0B98odoiYLXwcuwS5WSttGzK46t0n7TPRQ4ozwcTv82UY6TQoIvI+sJfTzqK9dQ==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "2.34.0", + "@typescript-eslint/experimental-utils": "3.3.0", "functional-red-black-tree": "^1.0.1", "regexpp": "^3.0.0", + "semver": "^7.3.2", "tsutils": "^3.17.1" } }, "@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==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-3.3.0.tgz", + "integrity": "sha512-d4pGIAbu/tYsrPrdHCQ5xfadJGvlkUxbeBB56nO/VGmEDi/sKmfa5fGty5t5veL1OyJBrUmSiRn1R1qfVDydrg==", "dev": true, "requires": { "@types/json-schema": "^7.0.3", - "@typescript-eslint/typescript-estree": "2.34.0", + "@typescript-eslint/typescript-estree": "3.3.0", "eslint-scope": "^5.0.0", "eslint-utils": "^2.0.0" } @@ -136,12 +137,41 @@ "@typescript-eslint/experimental-utils": "2.34.0", "@typescript-eslint/typescript-estree": "2.34.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": { - "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==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-3.3.0.tgz", + "integrity": "sha512-3SqxylENltEvJsjjMSDCUx/edZNSC7wAqifUU1Ywp//0OWEZwMZJfecJud9XxJ/40rAKEbJMKBOQzeOjrLJFzQ==", "dev": true, "requires": { "debug": "^4.1.1", diff --git a/package.json b/package.json index 2471197..f5f00a1 100644 --- a/package.json +++ b/package.json @@ -14,8 +14,8 @@ "@rollup/plugin-json": "^4.1.0", "@rollup/plugin-typescript": "^4.1.2", "@types/node": "^14.0.13", - "@typescript-eslint/eslint-plugin": "^2.26.0", - "@typescript-eslint/parser": "^2.26.0", + "@typescript-eslint/eslint-plugin": "^3.3.0", + "@typescript-eslint/parser": "^2.34.0", "eslint": "^6.8.0", "eslint-plugin-eslint-comments": "^3.1.2", "eslint-plugin-import": "^2.20.2", @@ -29,8 +29,8 @@ "typescript": "^3.9.5" }, "peerDependencies": { - "@typescript-eslint/eslint-plugin": "^2.26.0", - "@typescript-eslint/parser": "^2.26.0", + "@typescript-eslint/eslint-plugin": "^3.3.0", + "@typescript-eslint/parser": "^2.34.0", "eslint": "^6.8.0", "eslint-plugin-eslint-comments": "^3.1.2", "eslint-plugin-import": "^2.20.2", diff --git a/src/rules/typescript/default.json b/src/rules/typescript/default.json index 2b45050..fa868f6 100644 --- a/src/rules/typescript/default.json +++ b/src/rules/typescript/default.json @@ -16,6 +16,7 @@ "@typescript-eslint/explicit-function-return-type": [ "error", { + "allowConciseArrowFunctionExpressionsStartingWithVoid": false, "allowExpressions": false, "allowHigherOrderFunctions": false, "allowTypedFunctionExpressions": false @@ -61,12 +62,9 @@ "outerIIFEBody": 1 } ], - "@typescript-eslint/interface-name-prefix": [ + "@typescript-eslint/method-signature-style": [ "error", - { - "allowUnderscorePrefix": false, - "prefixWithI": "always" - } + "property" ], "@typescript-eslint/no-base-to-string": [ "error" @@ -125,9 +123,7 @@ "@typescript-eslint/no-unnecessary-condition": [ "error", { - "allowConstantLoopConditions": false, - "checkArrayPredicates": true, - "ignoreRhs": true + "allowConstantLoopConditions": false } ], "@typescript-eslint/no-unnecessary-type-assertion": [ @@ -213,9 +209,13 @@ "@typescript-eslint/strict-boolean-expressions": [ "error", { - "allowNullable": false, - "allowSafe": false, - "ignoreRhs": false + "allowAny": false, + "allowNullableBoolean": false, + "allowNullableNumber": false, + "allowNullableObject": false, + "allowNullableString": false, + "allowNumber": false, + "allowString": false } ], "@typescript-eslint/type-annotation-spacing": [ @@ -297,4 +297,4 @@ "space-before-function-paren": [ "off" ] -} +} \ No newline at end of file diff --git a/src/typescript.ts b/src/typescript.ts index 6295159..cdbd1f8 100644 --- a/src/typescript.ts +++ b/src/typescript.ts @@ -3,7 +3,6 @@ import rDefault from "./rules/typescript/default.json"; module.exports = { "extends": [ "./javascript", - "plugin:@typescript-eslint/eslint-recommended", "plugin:@typescript-eslint/recommended", "plugin:@typescript-eslint/recommended-requiring-type-checking", "plugin:import/typescript", -- 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 'package.json') 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 'package.json') 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 ee0e9ca2e4eb350bbefa2da358e3c0b6b13bb1d5 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Thu, 18 Jun 2020 01:06:15 +0400 Subject: Updated RollUp version Signed-off-by: Valentin Popov --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'package.json') diff --git a/package-lock.json b/package-lock.json index ef9feed..559443f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1776,9 +1776,9 @@ } }, "rollup": { - "version": "2.16.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.16.1.tgz", - "integrity": "sha512-UYupMcbFtoWLB6ZtL4hPZNUTlkXjJfGT33Mmhz3hYLNmRj/cOvX2B26ZxDQuEpwtLdcyyyraBGQ7EfzmMJnXXg==", + "version": "2.17.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.17.0.tgz", + "integrity": "sha512-4Um68vKyyTLzT+EWClgc+nyxSlunlmx8wgCO16RDicwxvccnyBHguoNqxPaJL/YPAdvuAJkqaFPf/BfDojzEZA==", "dev": true }, "rollup-plugin-terser": { diff --git a/package.json b/package.json index 17cfa4d..8120229 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "eslint-plugin-sonarjs": "^0.5.0", "eslint-plugin-unicorn": "^20.1.0", "eslint-plugin-vue": "^6.2.2", - "rollup": "^2.16.1", + "rollup": "^2.17.0", "rollup-plugin-terser": "^6.1.0", "tslib": "^2.0.0", "typescript": "^3.9.5" -- cgit v1.2.3 From 2b9c6380f071a3fc6379a41259d9f5198d02be7b Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Thu, 18 Jun 2020 01:06:52 +0400 Subject: Bump version Signed-off-by: Valentin Popov --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'package.json') diff --git a/package-lock.json b/package-lock.json index 559443f..e083b9b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@valentineus/eslint-config", - "version": "0.0.15", + "version": "0.0.16", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 8120229..14c5419 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@valentineus/eslint-config", - "version": "0.0.15", + "version": "0.0.16", "description": "Personal ESLint configuration", "main": "index.js", "repository": "git@code.valentineus.link:eslint-config.git", -- cgit v1.2.3