chore: 标准化tsconfig,并改了错误的$schema
parent
b814fb5105
commit
b5a4ebe2f6
@ -1,31 +1,35 @@
|
|||||||
{
|
{
|
||||||
|
"$schema": "https://json.schemastore.org/tsconfig",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "esnext",
|
"baseUrl": ".",
|
||||||
"module": "esnext",
|
// https://vite.dev/config/build-options.html#build-target
|
||||||
// "useDefineForClassFields": true,
|
"target": "ES2020",
|
||||||
"moduleResolution": "bundler",
|
"module": "ESNext",
|
||||||
|
"moduleResolution": "Bundler",
|
||||||
|
"lib": ["ESNext", "DOM", "DOM.Iterable"],
|
||||||
|
"skipLibCheck": true,
|
||||||
|
// This setting lets you specify a file for storing incremental compilation information as a part of composite projects which enables faster building of larger TypeScript codebases.
|
||||||
|
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.tsbuildinfo",
|
||||||
"strict": true,
|
"strict": true,
|
||||||
|
"allowJs": true,
|
||||||
"jsx": "preserve",
|
"jsx": "preserve",
|
||||||
"strictNullChecks": false,
|
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true,
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"strictFunctionTypes": false,
|
"noEmit": true,
|
||||||
"lib": ["esnext", "dom"],
|
|
||||||
"noImplicitAny": false,
|
|
||||||
"baseUrl": ".",
|
|
||||||
"allowJs": true,
|
|
||||||
"experimentalDecorators": true,
|
|
||||||
"paths": {
|
"paths": {
|
||||||
"@/*": ["src/*"]
|
"@/*": ["./src/*"]
|
||||||
},
|
},
|
||||||
"types": ["vite/client"],
|
"types": ["node", "vite/client"],
|
||||||
"skipLibCheck": true,
|
// 自定义配置
|
||||||
"removeComments": true,
|
"noImplicitAny": false, // 禁用 隐式的any错误
|
||||||
// 允许默认导入
|
"removeComments": true, // 移除 ts注释
|
||||||
"allowSyntheticDefaultImports": true,
|
"experimentalDecorators": true, // 启用实验性的装饰器支持
|
||||||
"forceConsistentCasingInFileNames": true
|
"strictFunctionTypes": false, // 禁用严格函数类型检查
|
||||||
|
"strictNullChecks": false, // 禁用严格的空值检查
|
||||||
|
"allowSyntheticDefaultImports": true, // 允许默认导入
|
||||||
|
"forceConsistentCasingInFileNames": true // 强制在文件名中使用一致的大小写
|
||||||
},
|
},
|
||||||
"include": ["src/**/*.ts", "src/**/*.vue", "src/types/**/*.d.ts", "vite.config.ts"],
|
"include": ["src/**/.ts", "src/**/*.vue", "vite.config.ts", "vitest.config.ts", "eslint.config.ts"],
|
||||||
"exclude": ["node_modules", "dist", "**/*.js", "**/*.md", "src/**/*.md"]
|
"exclude": ["node_modules", "dist", "src/**/__tests__/*"]
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue