From edb9ece0e33e769e4b1fca30fa0657fdfeb0d5e8 Mon Sep 17 00:00:00 2001 From: pheralb Date: Sat, 6 Sep 2025 17:58:30 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9A=99=EF=B8=8F=20Upgrade=20to=20eslint.conf?= =?UTF-8?q?ig.ts=20+=20add=20typescript-eslint=20for=20typesafety=20+=20de?= =?UTF-8?q?lete=20deprecated=20ts.config(),=20use=20export=20default=20ins?= =?UTF-8?q?tead?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- eslint.config.mjs => eslint.config.ts | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) rename eslint.config.mjs => eslint.config.ts (69%) diff --git a/eslint.config.mjs b/eslint.config.ts similarity index 69% rename from eslint.config.mjs rename to eslint.config.ts index 71a69fe..ecce8d7 100644 --- a/eslint.config.mjs +++ b/eslint.config.ts @@ -14,7 +14,7 @@ import svelteConfig from "./svelte.config.js"; // Ignore files: const gitignorePath = fileURLToPath(new URL("./.gitignore", import.meta.url)); -export default ts.config( +export default [ includeIgnoreFile(gitignorePath), js.configs.recommended, ...ts.configs.recommended, @@ -24,9 +24,23 @@ export default ts.config( { languageOptions: { globals: { ...globals.browser, ...globals.node }, + parserOptions: { + tsconfigRootDir: fileURLToPath(new URL(".", import.meta.url)), + }, }, rules: { "no-undef": "off", + "@typescript-eslint/array-type": "off", + "@typescript-eslint/consistent-type-definitions": "off", + "@typescript-eslint/consistent-type-imports": [ + "warn", + { prefer: "type-imports", fixStyle: "inline-type-imports" }, + ], + "@typescript-eslint/no-unused-vars": [ + "warn", + { argsIgnorePattern: "^_" }, + ], + "@typescript-eslint/require-await": "off", }, }, { @@ -46,4 +60,4 @@ export default ts.config( "svelte/no-at-html-tags": "off", }, }, -); +];