tsconfig.base.json 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. {
  2. "$schema": "http://json.schemastore.org/tsconfig",
  3. "compilerOptions": {
  4. // NOTE: We DO NOT use typescript to compile the application. Babel is
  5. // responsible for handing transformation of tsx files into plain JavaScript
  6. // compiles for the browser (and uses preset-env to determine what ECMA
  7. // features are supported based on our browser usage configuration in
  8. // package.json). `target` DOES NOT affect the babel output! [0]
  9. //
  10. // We DO however, use ts-node to build jest, webpack, and a few other
  11. // {build,dev}-time tools. Because these are run through node, we can
  12. // target what our current version of node supports (see [1])
  13. //
  14. // [0]: https://babeljs.io/docs/en/babel-preset-typescript
  15. // [1]: https://node.green
  16. "module": "commonjs",
  17. "target": "ES2022",
  18. "moduleResolution": "node",
  19. // We add esnext to lib to pull in types for all newer ECMAScript features
  20. "lib": ["esnext", "dom"],
  21. // Skip type checking of all declaration files
  22. "skipLibCheck": true,
  23. // We do not actually use tsc to output any JavaScript anywhere
  24. "noEmit": true,
  25. // Don't do anything to JSX. This doesn't really matter since we don't use
  26. // typescript to compile files, but left here for documentation purposes.
  27. "jsx": "preserve",
  28. // Type checking specific options
  29. "alwaysStrict": false,
  30. "noFallthroughCasesInSwitch": true,
  31. "noImplicitAny": false,
  32. "noImplicitReturns": true,
  33. "noImplicitThis": true,
  34. "noUnusedLocals": true,
  35. "noUnusedParameters": true,
  36. "strict": true,
  37. "strictBindCallApply": false,
  38. "useUnknownInCatchVariables": false,
  39. // We do not configure these, but are left here for documentation purposes
  40. //
  41. // allowUnreachableCode
  42. // allowUnusedLabels
  43. // exactOptionalPropertyTypes
  44. // noImplicitOverride
  45. // noPropertyAccessFromIndexSignature
  46. // noUncheckedIndexedAccess
  47. // strictFunctionTypes
  48. // strictNullChecks
  49. // strictPropertyInitialization
  50. // anduseUnknownInCatchVariables
  51. // Emit configuration
  52. "declaration": false,
  53. "declarationMap": false,
  54. "downlevelIteration": true,
  55. "importHelpers": true,
  56. "inlineSources": false,
  57. "noEmitHelpers": true,
  58. "sourceMap": true,
  59. "pretty": false,
  60. // We do not configure these, but are left here for documentation purposes
  61. //
  62. // declarationDir
  63. // emitBOM
  64. // emitDeclarationOnly
  65. // importsNotUsedAsValues
  66. // inlineSourceMap
  67. // mapRoot
  68. // newLine
  69. // noEmitHelpers
  70. // noEmitOnError
  71. // outDir
  72. // outFile
  73. // preserveConstEnums
  74. // preserveValueImports
  75. // removeComments
  76. // sourceRoot
  77. // andstripInternal
  78. // These get overridden when necessary
  79. "allowJs": false,
  80. "checkJs": false,
  81. "esModuleInterop": true,
  82. "experimentalDecorators": true,
  83. "noImplicitUseStrict": true,
  84. "resolveJsonModule": true,
  85. "baseUrl": "../",
  86. "paths": {
  87. "sentry/*": ["static/app/*"],
  88. "sentry-test/*": ["tests/js/sentry-test/*"],
  89. "sentry-images/*": ["static/images/*"],
  90. "sentry-locale/*": ["src/sentry/locale/*"],
  91. "sentry-logos/*": ["src/sentry/static/sentry/images/logos/*"],
  92. "sentry-fonts/*": ["static/fonts/*"],
  93. "docs-ui/*": ["docs-ui/*"],
  94. // Use the stub file for type checking. Webpack resolver will use the real files
  95. // based on configuration.
  96. "integration-docs-platforms": [
  97. "fixtures/integration-docs/_platforms.json",
  98. "src/sentry/integration-docs/_platforms.json"
  99. ]
  100. },
  101. "plugins": [
  102. // The styled plugin provides language server autocompletion for styled
  103. // component template strings
  104. {"name": "typescript-styled-plugin"}
  105. ]
  106. },
  107. "include": ["../static/app", "../tests/js", "../fixtures/js-stubs"],
  108. "exclude": ["../node_modules", "../**/*.benchmark.ts"],
  109. "ts-node": {
  110. "transpileOnly": true
  111. }
  112. }