fix config files
This commit is contained in:
+4
-17
@@ -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',
|
||||
|
||||
+2
-1
@@ -46,7 +46,8 @@
|
||||
},
|
||||
"include": [
|
||||
"src/**/*.ts",
|
||||
"vite.config.ts"
|
||||
"vite.config.ts",
|
||||
"eslint.config.js"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
|
||||
+4
-1
@@ -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: [
|
||||
|
||||
Reference in New Issue
Block a user