1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- {
- "compilerOptions": {
- "strictNullChecks": true,
- "strictFunctionTypes": false,
- "noUnusedLocals": false,
- "noUnusedParameters": false,
- "noImplicitReturns": false,
- "noFallthroughCasesInSwitch": false,
- "target": "esnext",
- "module": "esnext", //module:指定哪种版本的模块化
- "moduleResolution": "node",
- "strict": false, //所有严格模式的总开关
- "jsx": "preserve",
- "sourceMap": true, //sourceMap 简单说,Source map 就是一个信息文件,里面储存着位置信息。也就是说,转换后的代码的每一个位置,所对应的转换前的位置。有了它,出错的时候,除错工具将直接显示原始代码,而不是转换后的代码。这无疑给开发者带来了很大方便。
- "resolveJsonModule": false,
- "esModuleInterop": false,
- "skipLibCheck": true, //跳过库文件的类型检查
- "alwaysStrict": false, //用来设置编译后的文件是否使用严格模式,默认为false
- "removeComments": true, //是否移除注释
- "lib": ["esnext", "dom"], //用来指定项目中使用的库
- "baseUrl": ".",
- "paths": {
- "@/*": ["src/*"],
- "components/*": ["src/components/*"],
- "utils/*": ["src/utils/*"]
- },
- "noImplicitAny": false, // 是否在表达式和声明上有隐含的any类型时报错
- "noImplicitThis": true, // 不允许不明确类型的this,【默认为true】
- "types": ["element-plus/global", "node"], //指定全局组件类型
- "allowSyntheticDefaultImports": true
- },
- "include": [
- //指定 TypeScript 编译器编译的文件列表。
- "src/**/*.ts",
- "src/**/*.d.ts",
- "src/**/*.tsx",
- "src/**/*.vue",
- "src/api/system/commonApi.js"
- ],
- "angularCompilerOptions": {
- "strictInjectionParameters": true,
- "strictTemplates": true,
- "fullTemplateTypeCheck": true
- },
- "editor": {
- "suggestions": {
- "strings": false
- }
- },
- "exclude": [
- //取消在 HTML 文件中的 TypeScript 校验
- // "src/**/*.vue",
- "node_modules/**/*",
- "elment-plus/**/*"
- ]
- }
|