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 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-05-05 18:03:46 +02:00
parent ef55ad7e73
commit 05a9e4ee47
2 changed files with 14 additions and 2 deletions

View File

@@ -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/**' },

View File

@@ -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",