From d2ea46f2437f01ebb9b2c6ea42d45e3022b703ce Mon Sep 17 00:00:00 2001 From: regexowl Date: Thu, 14 Mar 2024 11:22:41 +0100 Subject: [PATCH] ESLint: Turn ban-ts-comments rule on This turns on ban-ts-comments and adds a few configurations to it. ts-expect-error and ts-ignore are allowed, but only when accompanied by a description clarifying their usage. The minimum length of the description is set to 5. --- .eslintrc-typescript.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.eslintrc-typescript.yml b/.eslintrc-typescript.yml index 54eacbca..b1a3d840 100644 --- a/.eslintrc-typescript.yml +++ b/.eslintrc-typescript.yml @@ -3,5 +3,11 @@ extends: [ ] rules: - "@typescript-eslint/ban-ts-comment": off + "@typescript-eslint/ban-ts-comment": + - error + - ts-expect-error: 'allow-with-description' + ts-ignore: 'allow-with-description' + ts-nocheck: true + ts-check: true + minimumDescriptionLength: 5 "@typescript-eslint/ban-types": off