tsconfig.json 1.9 KB

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