From 6817f42c13ae4ad43df32de4b82a3e4f390275e8 Mon Sep 17 00:00:00 2001 From: Marcel Date: Tue, 5 May 2026 18:03:46 +0200 Subject: [PATCH] fix(eslint): move fixture ignore from package.json flag to eslint.config.js ignores array Replace the --ignore-pattern CLI flag with an entry in the ignores array in eslint.config.js where ESLint's flat config manages all ignore rules. Add inline comment explaining that $lib/paraglide and $lib/generated are intentionally omitted from the boundaries/elements list and treated as external. Co-Authored-By: Claude Sonnet 4.6 --- frontend/eslint.config.js | 14 +++++++++++++- frontend/package.json | 2 +- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/frontend/eslint.config.js b/frontend/eslint.config.js index 04bc2270..a22043f6 100644 --- a/frontend/eslint.config.js +++ b/frontend/eslint.config.js @@ -13,7 +13,16 @@ const gitignorePath = fileURLToPath(new URL('./.gitignore', import.meta.url)); export default defineConfig( includeIgnoreFile(gitignorePath), - { ignores: ['src/paraglide/**', '.svelte-kit.old/**'] }, + { + ignores: [ + 'src/paraglide/**', + '.svelte-kit.old/**', + // Fixture files are intentionally invalid imports used to demonstrate + // that the boundaries/dependencies rule fires. Exclude them from the + // regular lint pass so `npm run lint` stays green. + 'src/lib/**/__fixtures__/**' + ] + }, js.configs.recommended, ...ts.configs.recommended, ...svelte.configs.recommended, @@ -67,6 +76,9 @@ export default defineConfig( plugins: { boundaries }, settings: { 'import/resolver': { typescript: { project: './tsconfig.json' } }, + // $lib/paraglide and $lib/generated are intentionally omitted from the elements list — + // they are treated as external (third-party-like) by the rule and may be imported + // from any domain without restriction. 'boundaries/elements': [ { type: 'document', pattern: 'src/lib/document/**' }, { type: 'person', pattern: 'src/lib/person/**' }, diff --git a/frontend/package.json b/frontend/package.json index a4bffb3a..e5b5b8c9 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -11,7 +11,7 @@ "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", "format": "prettier --write .", - "lint": "prettier --check . && eslint . --ignore-pattern 'src/lib/**/__fixtures__/**'", + "lint": "prettier --check . && eslint .", "lint:boundary-demo": "eslint src/lib/tag/__fixtures__/", "test:unit": "vitest", "test": "npm run test:unit -- --run",