From 96663b121cce543d32ce54927564721f151ccc34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Fri, 14 Oct 2022 02:36:20 +0200 Subject: [PATCH] feat: update dependencies to latest minor version + update configs (#2) * chore: update dependencies to latest minor version * feat: update configs * chore: fix ESLint errors --- lib/configs/+eslint-plugin.js | 6 +++ lib/configs/_base.js | 7 ++++ lib/configs/_override-ts.js | 62 +++++++++++++++++++++++++---- lib/configs/_override-vue.js | 28 +++++++++++++ lib/rules/no-literal-call.js | 2 +- lib/rules/no-this-in-static.js | 2 +- lib/rules/no-use-ignored-vars.js | 2 +- lib/rules/no-useless-rest-spread.js | 2 +- package.json | 30 +++++++------- 9 files changed, 115 insertions(+), 26 deletions(-) diff --git a/lib/configs/+eslint-plugin.js b/lib/configs/+eslint-plugin.js index a28b341..2d5402f 100644 --- a/lib/configs/+eslint-plugin.js +++ b/lib/configs/+eslint-plugin.js @@ -41,6 +41,8 @@ module.exports = { "error", "@eslint-community/mysticatea/eslint-plugin/no-useless-token-range": "error", + "@eslint-community/mysticatea/eslint-plugin/prefer-object-rule": + "error", "@eslint-community/mysticatea/eslint-plugin/prefer-output-null": "error", "@eslint-community/mysticatea/eslint-plugin/prefer-placeholders": @@ -51,12 +53,16 @@ module.exports = { "error", "[^a-z'\"{].*\\.$", ], + "@eslint-community/mysticatea/eslint-plugin/require-meta-docs-description": + "error", "@eslint-community/mysticatea/eslint-plugin/require-meta-docs-url": [ "error", { pattern: rulesDocumentUrl }, ], "@eslint-community/mysticatea/eslint-plugin/require-meta-fixable": "error", + "@eslint-community/mysticatea/eslint-plugin/require-meta-schema": + "error", "@eslint-community/mysticatea/eslint-plugin/require-meta-type": "error", "@eslint-community/mysticatea/eslint-plugin/test-case-property-ordering": [ diff --git a/lib/configs/_base.js b/lib/configs/_base.js index 6359bd9..907c08b 100644 --- a/lib/configs/_base.js +++ b/lib/configs/_base.js @@ -33,6 +33,7 @@ module.exports = { "for-direction": "error", "func-style": ["error", "declaration"], "getter-return": "error", + "grouped-accessor-pairs": "error", "init-declarations": "error", "linebreak-style": ["error", "unix"], "lines-between-class-members": "error", @@ -47,11 +48,13 @@ module.exports = { "no-compare-neg-zero": "error", "no-cond-assign": "error", "no-constant-condition": "error", + "no-constructor-return": "error", "no-control-regex": "error", "no-debugger": "error", "no-delete-var": "error", "no-div-regex": "error", "no-dupe-args": "error", + "no-dupe-else-if": "error", "no-dupe-keys": "error", "no-duplicate-case": "error", "no-else-return": "error", @@ -128,6 +131,7 @@ module.exports = { "no-self-assign": ["error", { props: true }], "no-self-compare": "error", "no-sequences": "error", + "no-setter-return": "error", "no-shadow": ["error", { builtinGlobals: true }], "no-shadow-restricted-names": "error", "no-sparse-arrays": "error", @@ -173,6 +177,7 @@ module.exports = { { blankLine: "always", next: "function", prev: "*" }, { blankLine: "always", next: "*", prev: "function" }, ], + "prefer-exponentiation-operator": "error", "prefer-promise-reject-errors": "error", "prefer-regex-literals": "error", quotes: ["error", "double", { avoidEscape: true }], @@ -394,6 +399,8 @@ module.exports = { ], }, ], + "@eslint-community/mysticatea/eslint-comments/require-description": + "off", // prettier "@eslint-community/mysticatea/prettier": [ diff --git a/lib/configs/_override-ts.js b/lib/configs/_override-ts.js index 5a82da3..2b4e3f5 100644 --- a/lib/configs/_override-ts.js +++ b/lib/configs/_override-ts.js @@ -20,23 +20,45 @@ module.exports = { "error", "@eslint-community/mysticatea/ts/array-type": "error", "@eslint-community/mysticatea/ts/await-thenable": "error", - "@eslint-community/mysticatea/ts/ban-ts-ignore": "error", - "@eslint-community/mysticatea/ts/class-name-casing": "error", + "@eslint-community/mysticatea/ts/ban-ts-comment": "error", + "@eslint-community/mysticatea/ts/class-literal-property-style": + "error", + "@eslint-community/mysticatea/ts/comma-spacing": "error", "@eslint-community/mysticatea/ts/consistent-type-assertions": "error", + "@eslint-community/mysticatea/ts/default-param-last": "error", + "@eslint-community/mysticatea/ts/dot-notation": "error", "@eslint-community/mysticatea/ts/explicit-member-accessibility": "error", - "@eslint-community/mysticatea/ts/interface-name-prefix": + "@eslint-community/mysticatea/ts/explicit-module-boundary-types": + "error", + "@eslint-community/mysticatea/ts/init-declarations": "error", + "@eslint-community/mysticatea/ts/keyword-spacing": "error", + "@eslint-community/mysticatea/ts/lines-between-class-members": + "error", + "@eslint-community/mysticatea/ts/method-signature-style": "error", - "@eslint-community/mysticatea/ts/member-naming": "error", + "@eslint-community/mysticatea/ts/naming-convention": "error", "@eslint-community/mysticatea/ts/no-array-constructor": "error", + "@eslint-community/mysticatea/ts/no-base-to-string": "error", + "@eslint-community/mysticatea/ts/no-dupe-class-members": + "error", + "@eslint-community/mysticatea/ts/no-dynamic-delete": "error", "@eslint-community/mysticatea/ts/no-empty-interface": "error", + "@eslint-community/mysticatea/ts/no-extra-non-null-assertion": + "error", + "@eslint-community/mysticatea/ts/no-extra-semi": "error", "@eslint-community/mysticatea/ts/no-extraneous-class": "error", "@eslint-community/mysticatea/ts/no-floating-promises": "error", "@eslint-community/mysticatea/ts/no-for-in-array": "error", + "@eslint-community/mysticatea/ts/no-implied-eval": "error", "@eslint-community/mysticatea/ts/no-inferrable-types": "error", + "@eslint-community/mysticatea/ts/no-invalid-this": "error", + "@eslint-community/mysticatea/ts/no-invalid-void-type": "error", "@eslint-community/mysticatea/ts/no-misused-new": "error", "@eslint-community/mysticatea/ts/no-misused-promises": "error", + "@eslint-community/mysticatea/ts/no-non-null-asserted-optional-chain": + "error", "@eslint-community/mysticatea/ts/no-parameter-properties": "error", "@eslint-community/mysticatea/ts/no-require-imports": "error", @@ -44,27 +66,56 @@ module.exports = { "error", { allowDestructuring: true }, ], + "@eslint-community/mysticatea/ts/no-throw-literal": "error", + "@eslint-community/mysticatea/ts/no-unnecessary-boolean-literal-compare": + "error", "@eslint-community/mysticatea/ts/no-unnecessary-qualifier": "error", "@eslint-community/mysticatea/ts/no-unnecessary-type-arguments": "error", "@eslint-community/mysticatea/ts/no-unnecessary-type-assertion": "error", + "@eslint-community/mysticatea/ts/no-unsafe-assignment": "error", + "@eslint-community/mysticatea/ts/no-unsafe-call": "error", + "@eslint-community/mysticatea/ts/no-unsafe-member-access": + "error", + "@eslint-community/mysticatea/ts/no-unsafe-return": "error", + "@eslint-community/mysticatea/ts/no-unused-expressions": + "error", + "@eslint-community/mysticatea/ts/no-unused-vars-experimental": + "error", "@eslint-community/mysticatea/ts/no-var-requires": "error", + "@eslint-community/mysticatea/ts/prefer-as-const": "error", // https://github.com/typescript-eslint/typescript-eslint/issues/454 "@eslint-community/mysticatea/ts/prefer-function-type": "off", "@eslint-community/mysticatea/ts/prefer-includes": "error", "@eslint-community/mysticatea/ts/prefer-namespace-keyword": "error", + "@eslint-community/mysticatea/ts/prefer-nullish-coalescing": + "error", + "@eslint-community/mysticatea/ts/prefer-optional-chain": + "error", + "@eslint-community/mysticatea/ts/prefer-readonly-parameter-types": + "error", // https://github.com/typescript-eslint/typescript-eslint/issues/946 "@eslint-community/mysticatea/ts/prefer-readonly": "off", + "@eslint-community/mysticatea/ts/prefer-reduce-type-parameter": + "off", "@eslint-community/mysticatea/ts/prefer-regexp-exec": "error", "@eslint-community/mysticatea/ts/prefer-string-starts-ends-with": "error", + "@eslint-community/mysticatea/ts/prefer-ts-expect-error": "off", "@eslint-community/mysticatea/ts/restrict-plus-operands": "error", "@eslint-community/mysticatea/ts/require-array-sort-compare": "error", + "@eslint-community/mysticatea/ts/restrict-template-expressions": + "error", + "@eslint-community/mysticatea/ts/return-await": "error", + "@eslint-community/mysticatea/ts/space-before-function-paren": + "error", + "@eslint-community/mysticatea/ts/switch-exhaustiveness-check": + "error", "@eslint-community/mysticatea/ts/triple-slash-reference": "error", // なんか誤検知が多い... @@ -88,8 +139,6 @@ module.exports = { ], // Replacements - camelcase: "off", - "@eslint-community/mysticatea/ts/camelcase": "error", "no-empty-function": "off", "@eslint-community/mysticatea/ts/no-empty-function": "error", "no-useless-constructor": "off", @@ -117,7 +166,6 @@ module.exports = { "@eslint-community/mysticatea/ts/explicit-function-return-type": "off", // I want but this is not so... "@eslint-community/mysticatea/ts/func-call-spacing": "off", // favor of Prettier. - "@eslint-community/mysticatea/ts/generic-type-naming": "off", "@eslint-community/mysticatea/ts/indent": "off", // favor of Prettier. "@eslint-community/mysticatea/ts/member-delimiter-style": "off", // favor of Prettier. "@eslint-community/mysticatea/ts/member-ordering": "off", diff --git a/lib/configs/_override-vue.js b/lib/configs/_override-vue.js index 19c4496..0203b98 100644 --- a/lib/configs/_override-vue.js +++ b/lib/configs/_override-vue.js @@ -34,6 +34,10 @@ module.exports = { }, ], "@eslint-community/mysticatea/vue/comment-directive": "error", + "@eslint-community/mysticatea/vue/component-definition-name-casing": + "error", + "@eslint-community/mysticatea/vue/component-tags-order": + "error", "@eslint-community/mysticatea/vue/dot-location": "error", "@eslint-community/mysticatea/vue/eqeqeq": [ "error", @@ -55,33 +59,53 @@ module.exports = { }, }, ], + "@eslint-community/mysticatea/vue/max-len": [ + "error", + { tabWidth: 4 }, + ], "@eslint-community/mysticatea/vue/no-async-in-computed-properties": "error", "@eslint-community/mysticatea/vue/no-boolean-default": "error", "@eslint-community/mysticatea/vue/no-deprecated-scope-attribute": "error", + "@eslint-community/mysticatea/vue/no-deprecated-slot-attribute": + "error", + "@eslint-community/mysticatea/vue/no-deprecated-slot-scope-attribute": + "error", "@eslint-community/mysticatea/vue/no-dupe-keys": "error", "@eslint-community/mysticatea/vue/no-duplicate-attributes": "error", "@eslint-community/mysticatea/vue/no-empty-pattern": "error", + "@eslint-community/mysticatea/vue/no-irregular-whitespace": + "error", "@eslint-community/mysticatea/vue/no-parsing-error": "error", + "@eslint-community/mysticatea/vue/no-reserved-component-names": + "error", "@eslint-community/mysticatea/vue/no-reserved-keys": "error", "@eslint-community/mysticatea/vue/no-shared-component-data": "error", "@eslint-community/mysticatea/vue/no-side-effects-in-computed-properties": "error", + "@eslint-community/mysticatea/vue/no-static-inline-styles": + "error", "@eslint-community/mysticatea/vue/no-template-key": "error", "@eslint-community/mysticatea/vue/no-textarea-mustache": "error", + "@eslint-community/mysticatea/vue/no-unsupported-features": + "error", "@eslint-community/mysticatea/vue/no-unused-vars": "error", "@eslint-community/mysticatea/vue/object-curly-spacing": [ "error", "always", ], + "@eslint-community/mysticatea/vue/padding-line-between-blocks": + "error", "@eslint-community/mysticatea/vue/require-component-is": "error", "@eslint-community/mysticatea/vue/require-direct-export": "error", + "@eslint-community/mysticatea/vue/require-name-property": + "error", "@eslint-community/mysticatea/vue/require-render-return": "error", "@eslint-community/mysticatea/vue/require-v-for-key": "error", @@ -89,11 +113,15 @@ module.exports = { "error", "@eslint-community/mysticatea/vue/return-in-computed-property": "error", + "@eslint-community/mysticatea/vue/sort-keys": "error", "@eslint-community/mysticatea/vue/space-infix-ops": "error", "@eslint-community/mysticatea/vue/space-unary-ops": "error", + "@eslint-community/mysticatea/vue/static-class-names-order": + "error", "@eslint-community/mysticatea/vue/v-on-function-call": "error", "@eslint-community/mysticatea/vue/v-slot-style": "error", "@eslint-community/mysticatea/vue/valid-template-root": "error", + "@eslint-community/mysticatea/vue/valid-v-bind-sync": "error", "@eslint-community/mysticatea/vue/valid-v-bind": "error", "@eslint-community/mysticatea/vue/valid-v-cloak": "error", "@eslint-community/mysticatea/vue/valid-v-else-if": "error", diff --git a/lib/rules/no-literal-call.js b/lib/rules/no-literal-call.js index a89ec35..0d70853 100644 --- a/lib/rules/no-literal-call.js +++ b/lib/rules/no-literal-call.js @@ -18,7 +18,7 @@ const LITERAL_AND_CLASS_TYPE = /^(?:(?:Array|Class|Object)Expression|(?:Template module.exports = { meta: { docs: { - description: "Disallow a call of a literal.", + description: "disallow a call of a literal.", category: "Possible Errors", recommended: false, url: diff --git a/lib/rules/no-this-in-static.js b/lib/rules/no-this-in-static.js index aafa8ac..f6fa590 100644 --- a/lib/rules/no-this-in-static.js +++ b/lib/rules/no-this-in-static.js @@ -12,7 +12,7 @@ module.exports = { meta: { docs: { - description: "Disallow `this`/`super` in static methods", + description: "disallow `this`/`super` in static methods", category: "Best Practices", url: "https://github.com/eslint-community/eslint-plugin-mysticatea/blob/HEAD/docs/rules/no-this-in-static.md", diff --git a/lib/rules/no-use-ignored-vars.js b/lib/rules/no-use-ignored-vars.js index 9c041c8..bbac67a 100644 --- a/lib/rules/no-use-ignored-vars.js +++ b/lib/rules/no-use-ignored-vars.js @@ -17,7 +17,7 @@ const DEFAULT_IGNORE_PATTERN = /^_[a-zA-Z]+$/u module.exports = { meta: { docs: { - description: "Disallow a use of ignored variables.", + description: "disallow a use of ignored variables.", category: "Stylistic Issues", recommended: false, url: diff --git a/lib/rules/no-useless-rest-spread.js b/lib/rules/no-useless-rest-spread.js index 0d497d4..5591a50 100644 --- a/lib/rules/no-useless-rest-spread.js +++ b/lib/rules/no-useless-rest-spread.js @@ -94,7 +94,7 @@ function defineFixer(sourceCode, node) { module.exports = { meta: { docs: { - description: "Disallow unnecessary spread operators.", + description: "disallow unnecessary spread operators.", category: "Best Practices", recommended: false, url: diff --git a/package.json b/package.json index 495ae34..e636c4c 100644 --- a/package.json +++ b/package.json @@ -13,27 +13,27 @@ "eslint": ">=6.6.0" }, "dependencies": { - "@typescript-eslint/eslint-plugin": "~2.6.1", - "@typescript-eslint/parser": "~2.6.1", - "eslint-plugin-eslint-comments": "~3.1.2", - "eslint-plugin-eslint-plugin": "~2.1.0", - "eslint-plugin-node": "~10.0.0", - "eslint-plugin-prettier": "~3.1.1", - "eslint-plugin-vue": "~6.0.0", - "prettier": "~1.19.1", - "vue-eslint-parser": "^7.0.0" + "@typescript-eslint/eslint-plugin": "^2.34.0", + "@typescript-eslint/parser": "^2.34.0", + "eslint-plugin-eslint-comments": "^3.2.0", + "eslint-plugin-eslint-plugin": "^2.3.0", + "eslint-plugin-node": "^10.0.0", + "eslint-plugin-prettier": "^3.4.1", + "eslint-plugin-vue": "^6.2.2", + "prettier": "^1.19.1", + "vue-eslint-parser": "^7.11.0" }, "devDependencies": { "@eslint-community/eslint-plugin-mysticatea": "file:.", - "eslint": "~6.6.0", + "eslint": "^6.8.0", "fs-extra": "^8.1.0", - "globals": "^12.1.1", - "mocha": "^6.2.2", + "globals": "^12.4.0", + "mocha": "^6.2.3", "npm-run-all": "^4.1.5", "nyc": "^14.1.1", - "opener": "^1.5.1", - "rimraf": "^3.0.0", - "typescript": "~3.7.2" + "opener": "^1.5.2", + "rimraf": "^3.0.2", + "typescript": "^3.9.10" }, "scripts": { "clean": "rimraf .nyc_output coverage",