tsconfig.json 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. {
  2. "extends": "@vue/tsconfig/tsconfig.dom.json",
  3. "compilerOptions": {
  4. "baseUrl": ".",
  5. "target": "ESNext",
  6. "module": "ESNext",
  7. /* Bundler mode | 编译相关 */
  8. "moduleResolution": "bundler",
  9. "allowImportingTsExtensions": true,
  10. "resolveJsonModule": true,
  11. "isolatedModules": true,
  12. "noEmit": true,
  13. "jsx": "preserve",
  14. "removeComments": true,
  15. "useUnknownInCatchVariables": false, //是否允许在 catch 语句中使用 unknown 类型的变量。
  16. "declarationMap": false, //是否为每个生成的 .d.ts 文件生成源映射。
  17. "inlineSources": false, //是否将源文件的内容嵌入到源映射中。
  18. "skipLibCheck": true, //跳过所有的 *.d.ts 文件的类型检查。
  19. "preserveWatchOutput": true, //在 TypeScript 的观察模式下保留控制台输出。
  20. "experimentalDecorators": true, //启用对装饰器的实验性支持。
  21. "noLib": false, //不排除默认库文件(比如 lib.d.ts)的类型检查。
  22. "allowSyntheticDefaultImports": true,
  23. "jsxImportSource": "vue",
  24. "allowJs": true,
  25. /* Linting | 代码质量相关 */
  26. "strict": true,
  27. "useDefineForClassFields": true,
  28. "noImplicitOverride": true,
  29. "noUnusedLocals": true,
  30. "forceConsistentCasingInFileNames": true,
  31. "noUnusedParameters": false,
  32. "strictFunctionTypes": false,
  33. "noImplicitAny": false,
  34. "lib": ["dom", "esnext", "DOM.Iterable"],
  35. "types": ["node", "vite/client"],
  36. "paths": {
  37. "@/*": ["src/*"]
  38. }
  39. },
  40. "include": [
  41. "**/*.d.ts",
  42. "mock/**/*",
  43. "mocks/**/*",
  44. "src/**/*.ts",
  45. "src/**/*.tsx",
  46. "src/**/*.vue",
  47. "types/**/*.d.ts",
  48. "types/**/*.ts"
  49. ],
  50. "exclude": ["node_modules", "dist", "**/*.js", "**/*.md", "src/**/*.md"],
  51. "references": [
  52. {
  53. "path": "./tsconfig.node.json"
  54. }
  55. ]
  56. }