tsconfig.base.json 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  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. "jsxImportSource": "@emotion/react",
  29. // Type checking specific options
  30. "alwaysStrict": false,
  31. "noFallthroughCasesInSwitch": true,
  32. "noImplicitAny": false,
  33. "noImplicitReturns": true,
  34. "noImplicitThis": true,
  35. "noUnusedLocals": true,
  36. "noUnusedParameters": true,
  37. "strict": true,
  38. "strictBindCallApply": false,
  39. "useUnknownInCatchVariables": false,
  40. // We do not configure these, but are left here for documentation purposes
  41. //
  42. // allowUnreachableCode
  43. // allowUnusedLabels
  44. // exactOptionalPropertyTypes
  45. // noImplicitOverride
  46. // noPropertyAccessFromIndexSignature
  47. // noUncheckedIndexedAccess
  48. // strictFunctionTypes
  49. // strictNullChecks
  50. // strictPropertyInitialization
  51. // anduseUnknownInCatchVariables
  52. // Emit configuration
  53. "declaration": false,
  54. "declarationMap": false,
  55. "downlevelIteration": true,
  56. "importHelpers": true,
  57. "inlineSources": false,
  58. "noEmitHelpers": true,
  59. "sourceMap": true,
  60. "pretty": false,
  61. // We do not configure these, but are left here for documentation purposes
  62. //
  63. // declarationDir
  64. // emitBOM
  65. // emitDeclarationOnly
  66. // importsNotUsedAsValues
  67. // inlineSourceMap
  68. // mapRoot
  69. // newLine
  70. // noEmitHelpers
  71. // noEmitOnError
  72. // outDir
  73. // outFile
  74. // preserveConstEnums
  75. // preserveValueImports
  76. // removeComments
  77. // sourceRoot
  78. // andstripInternal
  79. // These get overridden when necessary
  80. "allowJs": false,
  81. "checkJs": false,
  82. "esModuleInterop": true,
  83. "experimentalDecorators": 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. // Use the stub file for type checking. Webpack resolver will use the real files
  94. // based on configuration.
  95. "integration-docs-platforms": [
  96. "fixtures/integration-docs/_platforms.json",
  97. "src/sentry/integration-docs/_platforms.json"
  98. ]
  99. },
  100. "plugins": [
  101. // The styled plugin provides language server autocompletion for styled
  102. // component template strings
  103. {"name": "typescript-styled-plugin"}
  104. ]
  105. },
  106. "include": ["../static/app", "../tests/js", "../fixtures/js-stubs"],
  107. "exclude": ["../node_modules", "../**/*.benchmark.ts"],
  108. "ts-node": {
  109. "transpileOnly": true
  110. }
  111. }