tsconfig.json 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. {
  2. "compilerOptions": {
  3. "target": "ESNext",
  4. "useDefineForClassFields": true,
  5. "module": "ESNext",
  6. "moduleResolution": "Node",
  7. // "moduleResolution": "Node",
  8. "types": ["vite/client"],
  9. /* Strict Type-Checking Options */
  10. "strict": true /* Enable all strict type-checking options. */,
  11. "noImplicitAny": false /* Raise error on expressions and declarations with an implied 'any' type. */,
  12. // "strictNullChecks": true, /* Enable strict null checks. */
  13. // "strictFunctionTypes": true, /* Enable strict checking of function types. */
  14. // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
  15. // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
  16. // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
  17. // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
  18. "jsx": "preserve",
  19. "resolveJsonModule": true,
  20. "isolatedModules": true,
  21. "esModuleInterop": true,
  22. "lib": ["ESNext", "DOM"],
  23. "skipLibCheck": true,
  24. "noEmit": true,
  25. "baseUrl": "./",
  26. "paths": {
  27. "@": ["src"],
  28. "@/*": ["src/*"],
  29. "#/*": ["types/*"]
  30. },
  31. "typeRoots": ["./node_modules/@types/", "./types"],
  32. "allowSyntheticDefaultImports": true,
  33. // 禁止对同一个文件的不一致的引用。
  34. "forceConsistentCasingInFileNames": true
  35. },
  36. "include": [
  37. "src/**/*.ts",
  38. "src/**/*.d.ts",
  39. "src/**/*.tsx",
  40. "src/**/*.vue",
  41. "build/**/*.ts",
  42. "build/**/*.d.ts",
  43. "types/*.d.ts",
  44. "types/**/*.d.ts",
  45. "vite.config.ts"
  46. ],
  47. "exclude": ["node_modules", "dist", "**/*.js"]
  48. }