mm
This commit is contained in:
@@ -17,24 +17,6 @@
|
||||
"esModuleInterop": true,
|
||||
|
||||
// 跳过 node_modules 类型检查,加快构建,避免第三方类型污染
|
||||
"skipLibCheck": true,
|
||||
|
||||
// 模块检测策略,不会影响 node_modules 中的第三方 CommonJS 依赖,Vite 会在预构建阶段自动将其转换为 ESM。
|
||||
"moduleDetection": "force",
|
||||
|
||||
// 保留源码中的 import / export 语句原样输出,不进行自动转换(如 import → require),通常与 moduleDetection: "force" 搭配使用
|
||||
"verbatimModuleSyntax": true,
|
||||
|
||||
// 是否检查“未使用的局部变量”
|
||||
"noUnusedLocals": true,
|
||||
|
||||
// 是否检查“未使用的函数参数”
|
||||
"noUnusedParameters": true,
|
||||
|
||||
// 是否只允许“可擦除的语法(Erasable Syntax),确保 TypeScript 语法在编译后可完全移除
|
||||
"erasableSyntaxOnly": true,
|
||||
|
||||
// 是否禁止 switch 语句中的 case 贯穿(fallthrough),如果 case 没有 break / return,会报错
|
||||
"noFallthroughCasesInSwitch": true
|
||||
"skipLibCheck": true
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user