From 18ef73d1ae84eefa8bc36c74ec06ff646e090101 Mon Sep 17 00:00:00 2001 From: Jason Ross Date: Sat, 18 Oct 2025 13:19:29 -0500 Subject: [PATCH] fix config files --- eslint.config.js | 21 ++++----------------- tsconfig.json | 3 ++- vite.config.ts | 5 ++++- 3 files changed, 10 insertions(+), 19 deletions(-) diff --git a/eslint.config.js b/eslint.config.js index 2fdc118..bf1e067 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -5,12 +5,7 @@ import prettier from 'eslint-plugin-prettier/recommended'; export default tseslint.config( // Ignore build outputs and dependencies { - ignores: [ - 'dist/**', - 'node_modules/**', - '*.js.map', - 'web-ext-artifacts/**', - ], + ignores: ['dist/**', 'node_modules/**', '*.js.map', 'web-ext-artifacts/**'], }, // Base JavaScript recommended rules @@ -24,7 +19,9 @@ export default tseslint.config( { languageOptions: { parserOptions: { - projectService: true, + projectService: { + allowDefaultProject: ['*.js', '*.mjs'], + }, tsconfigRootDir: import.meta.dirname, }, }, @@ -55,16 +52,6 @@ export default tseslint.config( // Enforce consistent return 'consistent-return': 'off', // TypeScript handles this - // Allow empty catch blocks with comment - '@typescript-eslint/no-unused-vars': [ - 'error', - { - argsIgnorePattern: '^_', - varsIgnorePattern: '^_', - caughtErrorsIgnorePattern: '^_', - }, - ], - // Browser extension specific '@typescript-eslint/no-misused-promises': [ 'error', diff --git a/tsconfig.json b/tsconfig.json index 7ae7fbe..9247640 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -46,7 +46,8 @@ }, "include": [ "src/**/*.ts", - "vite.config.ts" + "vite.config.ts", + "eslint.config.js" ], "exclude": [ "node_modules", diff --git a/vite.config.ts b/vite.config.ts index f132190..c7d8ce9 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -14,7 +14,10 @@ function getTargetFromMode(mode: string): 'firefox' | 'chrome' { export default defineConfig(({ mode }) => { const target = getTargetFromMode(mode); const manifestPath = resolve(__dirname, `src/${target}/manifest.json`); - const manifest = JSON.parse(readFileSync(manifestPath, 'utf-8')); + const manifest = JSON.parse(readFileSync(manifestPath, 'utf-8')) as Record< + string, + unknown + >; return { plugins: [