chore(lint): 允许在 src/env.d.ts 使用 triple-slash 引用 .astro/types;避免类型退化与 IDE 误报

This commit is contained in:
2025-11-27 17:57:14 +08:00
parent 2e84063f89
commit e4bc5b47be
2 changed files with 8 additions and 1 deletions
+8
View File
@@ -62,6 +62,14 @@ export default [
} }
}, },
// Allow triple-slash reference in env.d.ts for Astro types
{
files: ['src/env.d.ts'],
rules: {
'@typescript-eslint/triple-slash-reference': 'off'
}
},
// Ignores // Ignores
{ ignores: ['dist', 'node_modules', 'eslint.config.js', '.astro', 'astro.config.*', 'ref/**'] } { ignores: ['dist', 'node_modules', 'eslint.config.js', '.astro', 'astro.config.*', 'ref/**'] }
]; ];
-1
View File
@@ -11,7 +11,6 @@
}, },
"include": [ "include": [
"src", "src",
"env.d.ts",
"astro.config.mjs", "astro.config.mjs",
".astro/types.d.ts" ".astro/types.d.ts"
], ],