From 2b2002336eb4f3a14e9c731a16531ad78e5e4fd4 Mon Sep 17 00:00:00 2001 From: Mephisto5558 <87113906+Mephisto5558@users.noreply.github.com> Date: Thu, 5 Dec 2024 09:17:25 +0100 Subject: [PATCH] made all d.ts rules work for all ts files --- configs/@typescript-eslint.jsonc | 5 +++-- configs/eslint.jsonc | 2 +- configs/sonarjs-html.jsonc | 6 ------ eslint.config.js | 6 +++--- 4 files changed, 7 insertions(+), 12 deletions(-) diff --git a/configs/@typescript-eslint.jsonc b/configs/@typescript-eslint.jsonc index bbd42fb..c30f8fa 100644 --- a/configs/@typescript-eslint.jsonc +++ b/configs/@typescript-eslint.jsonc @@ -94,8 +94,9 @@ "warn", { "ignore": [ - 1, - -1 + -1, + 0, + 1 ], "ignoreDefaultValues": true, "ignoreClassFieldInitialValues": true, diff --git a/configs/eslint.jsonc b/configs/eslint.jsonc index 170a188..d4464e2 100644 --- a/configs/eslint.jsonc +++ b/configs/eslint.jsonc @@ -200,7 +200,7 @@ "no-lone-blocks": "error", "no-lonely-if": "error", "no-loop-func": "off", // Handled by `@typescript-eslint/no-loop-func` - "no-magic-numbers": "off", // Handled by `custom/no-magic-numbers` + "no-magic-numbers": "off", // Handled by `@typescript-eslint/no-magic-numbers` "no-multi-assign": "error", "no-multi-str": "error", "no-negated-condition": "off", // Handled by `unicorn/no-negated-condition` because unicorn has an autofix option for it diff --git a/configs/sonarjs-html.jsonc b/configs/sonarjs-html.jsonc index aa6a5be..2232816 100644 --- a/configs/sonarjs-html.jsonc +++ b/configs/sonarjs-html.jsonc @@ -1,10 +1,4 @@ { - "alt-text": "warn", - "anchor-has-content": "warn", // Seems to not work - "anchor-is-valid": "error", - "label-has-associated-control": "warn", - "media-has-caption": "warn", - "mouse-events-a11y": "warn", "object-alt-content": "warn", "table-header": "warn", "table-header-reference": "warn" diff --git a/eslint.config.js b/eslint.config.js index a87bca4..f58f5e4 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -104,10 +104,10 @@ export default [ } }, { - name: 'eslint-config:d.ts', - files: ['**/*.d.ts'], + name: 'eslint-config:ts', + files: ['**/*.ts'], rules: { - // D.TS-Only rules + // TS-Only rules 'no-undef': 'off', 'no-shadow': 'off', 'no-use-before-define': 'off',