From 064139dc9946ecdffc930ca7571439f380ba6e06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Sat, 18 Dec 2021 04:52:31 +0100 Subject: [PATCH] feat: update `@typescript-eslint/*` + update configs --- lib/configs/_override-ts.js | 27 ++++++++++++++++++++++++++- package.json | 4 ++-- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/lib/configs/_override-ts.js b/lib/configs/_override-ts.js index 900e37c..df3ec34 100644 --- a/lib/configs/_override-ts.js +++ b/lib/configs/_override-ts.js @@ -20,9 +20,13 @@ module.exports = { "@mysticatea/ts/array-type": "error", "@mysticatea/ts/await-thenable": "error", "@mysticatea/ts/ban-ts-comment": "error", + "@mysticatea/ts/ban-tslint-comment": "error", "@mysticatea/ts/class-literal-property-style": "error", + "@mysticatea/ts/comma-dangle": "error", "@mysticatea/ts/comma-spacing": "error", + "@mysticatea/ts/consistent-indexed-object-style": "error", "@mysticatea/ts/consistent-type-assertions": "error", + "@mysticatea/ts/consistent-type-imports": "error", "@mysticatea/ts/default-param-last": "error", "@mysticatea/ts/dot-notation": "error", "@mysticatea/ts/explicit-member-accessibility": "error", @@ -34,7 +38,10 @@ module.exports = { "@mysticatea/ts/naming-convention": "error", "@mysticatea/ts/no-array-constructor": "error", "@mysticatea/ts/no-base-to-string": "error", + "@mysticatea/ts/no-confusing-non-null-assertion": "error", + "@mysticatea/ts/no-confusing-void-expression": "error", "@mysticatea/ts/no-dupe-class-members": "error", + "@mysticatea/ts/no-duplicate-imports": "error", "@mysticatea/ts/no-dynamic-delete": "error", "@mysticatea/ts/no-empty-interface": "error", "@mysticatea/ts/no-extra-non-null-assertion": "error", @@ -42,15 +49,24 @@ module.exports = { "@mysticatea/ts/no-extraneous-class": "error", "@mysticatea/ts/no-floating-promises": "error", "@mysticatea/ts/no-for-in-array": "error", + "@mysticatea/ts/no-implicit-any-catch": "error", "@mysticatea/ts/no-implied-eval": "error", "@mysticatea/ts/no-inferrable-types": "error", "@mysticatea/ts/no-invalid-this": "error", "@mysticatea/ts/no-invalid-void-type": "error", + "@mysticatea/ts/no-loss-of-precision": "error", + "@mysticatea/ts/no-loop-func": "error", + "@mysticatea/ts/no-meaningless-void-operator": "error", "@mysticatea/ts/no-misused-new": "error", "@mysticatea/ts/no-misused-promises": "error", + "@mysticatea/ts/no-non-null-asserted-nullish-coalescing": + "error", "@mysticatea/ts/no-non-null-asserted-optional-chain": "error", "@mysticatea/ts/no-parameter-properties": "error", + "@mysticatea/ts/no-redeclare": "error", "@mysticatea/ts/no-require-imports": "error", + "@mysticatea/ts/no-restricted-imports": "error", + "@mysticatea/ts/no-shadow": "error", "@mysticatea/ts/no-this-alias": [ "error", { allowDestructuring: true }, @@ -61,17 +77,23 @@ module.exports = { "@mysticatea/ts/no-unnecessary-qualifier": "error", "@mysticatea/ts/no-unnecessary-type-arguments": "error", "@mysticatea/ts/no-unnecessary-type-assertion": "error", + "@mysticatea/ts/no-unnecessary-type-constraint": "error", + "@mysticatea/ts/no-unsafe-argument": "error", "@mysticatea/ts/no-unsafe-assignment": "error", "@mysticatea/ts/no-unsafe-call": "error", "@mysticatea/ts/no-unsafe-member-access": "error", "@mysticatea/ts/no-unsafe-return": "error", "@mysticatea/ts/no-unused-expressions": "error", - "@mysticatea/ts/no-unused-vars-experimental": "error", "@mysticatea/ts/no-var-requires": "error", + "@mysticatea/ts/non-nullable-type-assertion-style": "error", + "@mysticatea/ts/object-curly-spacing": "error", + "@mysticatea/ts/padding-line-between-statements": "error", "@mysticatea/ts/prefer-as-const": "error", + "@mysticatea/ts/prefer-enum-initializers": "error", // https://github.com/typescript-eslint/typescript-eslint/issues/454 "@mysticatea/ts/prefer-function-type": "off", "@mysticatea/ts/prefer-includes": "error", + "@mysticatea/ts/prefer-literal-enum-member": "error", "@mysticatea/ts/prefer-namespace-keyword": "error", "@mysticatea/ts/prefer-nullish-coalescing": "error", "@mysticatea/ts/prefer-optional-chain": "error", @@ -80,13 +102,16 @@ module.exports = { "@mysticatea/ts/prefer-readonly": "off", "@mysticatea/ts/prefer-reduce-type-parameter": "off", "@mysticatea/ts/prefer-regexp-exec": "error", + "@mysticatea/ts/prefer-return-this-type": "off", "@mysticatea/ts/prefer-string-starts-ends-with": "error", "@mysticatea/ts/prefer-ts-expect-error": "off", "@mysticatea/ts/restrict-plus-operands": "error", "@mysticatea/ts/require-array-sort-compare": "error", "@mysticatea/ts/restrict-template-expressions": "error", "@mysticatea/ts/return-await": "error", + "@mysticatea/ts/sort-type-union-intersection-members": "error", "@mysticatea/ts/space-before-function-paren": "error", + "@mysticatea/ts/space-infix-ops": "error", "@mysticatea/ts/switch-exhaustiveness-check": "error", "@mysticatea/ts/triple-slash-reference": "error", // なんか誤検知が多い... diff --git a/package.json b/package.json index 99120dd..a61cf58 100644 --- a/package.json +++ b/package.json @@ -13,8 +13,8 @@ "eslint": ">=6.6.0" }, "dependencies": { - "@typescript-eslint/eslint-plugin": "^2.34.0", - "@typescript-eslint/parser": "^2.34.0", + "@typescript-eslint/eslint-plugin": "^4.33.0", + "@typescript-eslint/parser": "^4.33.0", "eslint-plugin-eslint-comments": "^3.2.0", "eslint-plugin-eslint-plugin": "^2.3.0", "eslint-plugin-node": "^10.0.0",