tsconfig.json 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. {
  2. "extends": "@vue/tsconfig/tsconfig.json",
  3. "include": [
  4. "src/**/*.ts",
  5. "src/.d.ts/*.d.ts",
  6. "src/.d.ts/**/*.d.ts",
  7. "src/**/*.d.ts",
  8. "src/**/*.tsx",
  9. "src/**/*.vue",
  10. "vite/**/*.ts",
  11. ".eslintrc.cjs",
  12. "vite.config.ts",
  13. "src/.d.ts/vite-env.d.ts"
  14. ],
  15. "compilerOptions": {
  16. "target": "ES2020",
  17. "module": "ESNext",
  18. "moduleResolution": "Bundler",
  19. "lib": [
  20. "ESNext",
  21. "DOM",
  22. "DOM.Iterable"
  23. ],
  24. "skipLibCheck": true,
  25. // 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.
  26. "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.tsbuildinfo",
  27. "strict": true,
  28. "allowJs": true,
  29. "jsx": "preserve",
  30. "sourceMap": true,
  31. "resolveJsonModule": true,
  32. "esModuleInterop": true,
  33. "noEmit": true,
  34. "types": [
  35. "node",
  36. "element-plus/global"
  37. ],
  38. "baseUrl": "./",
  39. "paths": {
  40. "@a": [
  41. "src/api"
  42. ],
  43. "@a/*": [
  44. "src/api/*"
  45. ],
  46. "@s": [
  47. "src/stores"
  48. ],
  49. "@s/*": [
  50. "src/stores/*"
  51. ],
  52. "@r": [
  53. "src/router"
  54. ],
  55. "@r/*": [
  56. "src/router/*"
  57. ],
  58. "@v/*": [
  59. "src/views/*"
  60. ],
  61. "@@/*": [
  62. "src/core/*"
  63. ],
  64. "@@@/*": [
  65. "src/components/*"
  66. ],
  67. "@com/*": [
  68. "src/components/*"
  69. ],
  70. "@/*": [
  71. "src/*"
  72. ],
  73. "~/*": [
  74. "./*"
  75. ]
  76. },
  77. // 自定义配置
  78. "noImplicitAny": false, // 禁用 隐式的any错误
  79. "removeComments": true, // 移除 ts注释
  80. "experimentalDecorators": true, // 启用实验性的装饰器支持
  81. "strictFunctionTypes": false, // 禁用严格函数类型检查
  82. "strictNullChecks": false, // 禁用严格的空值检查
  83. "allowSyntheticDefaultImports": true, // 允许默认导入
  84. "forceConsistentCasingInFileNames": true // 强制在文件名中使用一致的大小写
  85. },
  86. "exclude": [
  87. "node_modules"
  88. ],
  89. "references": [
  90. {
  91. "path": "./tsconfig.config.json"
  92. }
  93. ]
  94. }