chore: 标准化tsconfig,并改了错误的$schema

This commit is contained in:
yangxu52 2025-03-07 12:17:41 +08:00
parent b814fb5105
commit b5a4ebe2f6
2 changed files with 28 additions and 23 deletions

View File

@ -1,5 +1,5 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"$schema": "https://json.schemastore.org/package",
"name": "ruoyi-vue-plus",
"version": "5.3.0",
"description": "RuoYi-Vue-Plus多租户管理系统",
@ -52,6 +52,7 @@
"@types/crypto-js": "4.2.2",
"@types/file-saver": "2.0.7",
"@types/js-cookie": "3.0.6",
"@types/node": "^22.13.4",
"@types/nprogress": "0.2.3",
"@unocss/preset-attributify": "66.0.0",
"@unocss/preset-icons": "66.0.0",
@ -67,7 +68,7 @@
"globals": "16.0.0",
"prettier": "3.5.2",
"sass": "1.84.0",
"typescript": "5.7.3",
"typescript": "~5.7.3",
"unocss": "66.0.0",
"unplugin-auto-import": "0.17.5",
"unplugin-icons": "0.18.5",
@ -78,7 +79,7 @@
"vite-plugin-svg-icons-ng": "1.0.2",
"vite-plugin-vue-devtools": "7.7.1",
"vitest": "3.0.5",
"vue-tsc": "2.2.0"
"vue-tsc": "^2.2.2"
},
"engines": {
"node": ">=18.18.0",

View File

@ -1,31 +1,35 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"compilerOptions": {
"target": "esnext",
"module": "esnext",
// "useDefineForClassFields": true,
"moduleResolution": "bundler",
"baseUrl": ".",
// https://vite.dev/config/build-options.html#build-target
"target": "ES2020",
"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,
"allowJs": true,
"jsx": "preserve",
"strictNullChecks": false,
"sourceMap": true,
"resolveJsonModule": true,
"esModuleInterop": true,
"strictFunctionTypes": false,
"lib": ["esnext", "dom"],
"noImplicitAny": false,
"baseUrl": ".",
"allowJs": true,
"experimentalDecorators": true,
"noEmit": true,
"paths": {
"@/*": ["src/*"]
"@/*": ["./src/*"]
},
"types": ["vite/client"],
"skipLibCheck": true,
"removeComments": true,
//
"allowSyntheticDefaultImports": true,
"forceConsistentCasingInFileNames": true
"types": ["node", "vite/client"],
//
"noImplicitAny": false, // any
"removeComments": true, // ts
"experimentalDecorators": true, //
"strictFunctionTypes": false, //
"strictNullChecks": false, //
"allowSyntheticDefaultImports": true, //
"forceConsistentCasingInFileNames": true // 使
},
"include": ["src/**/*.ts", "src/**/*.vue", "src/types/**/*.d.ts", "vite.config.ts"],
"exclude": ["node_modules", "dist", "**/*.js", "**/*.md", "src/**/*.md"]
"include": ["src/**/.ts", "src/**/*.vue", "vite.config.ts", "vitest.config.ts", "eslint.config.ts"],
"exclude": ["node_modules", "dist", "src/**/__tests__/*"]
}