From 0fddd76b6b6c901db95bb6b82d2bfcf168e3ea3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Mon, 30 Oct 2023 00:08:10 +0100 Subject: [PATCH] Configure some new TypeScript ESLint rules. --- .eslintrc.json | 16 ++++++++-------- src/extensions/vscode/src/extension.ts | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 33c7d29c..e48bc480 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -31,6 +31,7 @@ "@typescript-eslint/block-spacing": "error", "@typescript-eslint/brace-style": "error", "@typescript-eslint/class-literal-property-style": "error", + "@typescript-eslint/class-methods-use-this": "error", "@typescript-eslint/comma-dangle": [ "error", { @@ -283,6 +284,13 @@ "@typescript-eslint/padding-line-between-statements": "off", "@typescript-eslint/parameter-properties": "error", "@typescript-eslint/prefer-as-const": "error", + "@typescript-eslint/prefer-destructuring": [ + "error", + { + "array": true, + "object": true + } + ], "@typescript-eslint/prefer-enum-initializers": "off", "@typescript-eslint/prefer-for-of": "error", "@typescript-eslint/prefer-function-type": "error", @@ -403,7 +411,6 @@ "brace-style": "off", "camelcase": "error", "capitalized-comments": "off", - "class-methods-use-this": "error", "comma-dangle": "off", "comma-spacing": "off", "comma-style": "error", @@ -739,13 +746,6 @@ "padding-line-between-statements": "off", "prefer-arrow-callback": "error", "prefer-const": "error", - "prefer-destructuring": [ - "error", - { - "array": true, - "object": true - } - ], "prefer-exponentiation-operator": "error", "prefer-named-capture-group": "off", "prefer-numeric-literals": "error", diff --git a/src/extensions/vscode/src/extension.ts b/src/extensions/vscode/src/extension.ts index 892b20ea..d9170a78 100644 --- a/src/extensions/vscode/src/extension.ts +++ b/src/extensions/vscode/src/extension.ts @@ -141,7 +141,7 @@ class CelerityTaskProvider implements TaskProvider { return [... this._tasks.values()].flat(); } - // eslint-disable-next-line class-methods-use-this + // eslint-disable-next-line @typescript-eslint/class-methods-use-this public resolveTask(_task : Task, _token : CancellationToken) : undefined { return undefined; }