tsconfig.base.json 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  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": [
  21. "esnext",
  22. "dom",
  23. "dom.iterable"
  24. ],
  25. // Skip type checking of all declaration files
  26. "skipLibCheck": true,
  27. // We do not actually use tsc to output any JavaScript anywhere
  28. "noEmit": true,
  29. // Don't do anything to JSX. This doesn't really matter since we don't use
  30. // typescript to compile files, but left here for documentation purposes.
  31. "jsx": "preserve",
  32. "jsxImportSource": "@emotion/react",
  33. // Type checking specific options
  34. "alwaysStrict": false,
  35. "noFallthroughCasesInSwitch": true,
  36. "noImplicitAny": false,
  37. "noImplicitReturns": true,
  38. "noImplicitThis": true,
  39. "noUnusedLocals": true,
  40. "noUnusedParameters": true,
  41. "strict": true,
  42. "strictBindCallApply": false,
  43. "useUnknownInCatchVariables": false,
  44. // We do not configure these, but are left here for documentation purposes
  45. //
  46. // allowUnreachableCode
  47. // allowUnusedLabels
  48. // exactOptionalPropertyTypes
  49. // noImplicitOverride
  50. // noPropertyAccessFromIndexSignature
  51. // noUncheckedIndexedAccess
  52. // strictFunctionTypes
  53. // strictNullChecks
  54. // strictPropertyInitialization
  55. // anduseUnknownInCatchVariables
  56. // Emit configuration
  57. "declaration": false,
  58. "declarationMap": false,
  59. "downlevelIteration": true,
  60. "importHelpers": true,
  61. "inlineSources": false,
  62. "noEmitHelpers": true,
  63. "sourceMap": true,
  64. "pretty": false,
  65. // We do not configure these, but are left here for documentation purposes
  66. //
  67. // declarationDir
  68. // emitBOM
  69. // emitDeclarationOnly
  70. // importsNotUsedAsValues
  71. // inlineSourceMap
  72. // mapRoot
  73. // newLine
  74. // noEmitHelpers
  75. // noEmitOnError
  76. // outDir
  77. // outFile
  78. // preserveConstEnums
  79. // preserveValueImports
  80. // removeComments
  81. // sourceRoot
  82. // andstripInternal
  83. // These get overridden when necessary
  84. "allowJs": false,
  85. "checkJs": false,
  86. "esModuleInterop": true,
  87. "experimentalDecorators": true,
  88. "resolveJsonModule": true,
  89. "baseUrl": "../",
  90. "paths": {
  91. "sentry/*": ["static/app/*"],
  92. "sentry-fixture/*": ["tests/js/fixtures/*"],
  93. "sentry-test/*": ["tests/js/sentry-test/*"],
  94. "sentry-images/*": ["static/images/*"],
  95. "sentry-locale/*": ["src/sentry/locale/*"],
  96. "sentry-logos/*": ["src/sentry/static/sentry/images/logos/*"],
  97. "sentry-fonts/*": ["static/fonts/*"]
  98. },
  99. "plugins": [
  100. // The styled plugin provides language server autocompletion for styled
  101. // component template strings
  102. { "name": "@styled/typescript-styled-plugin" }
  103. ]
  104. },
  105. "include": ["../static/app", "../tests/js"],
  106. "exclude": ["../node_modules", "../**/*.benchmark.ts"],
  107. "ts-node": {
  108. "transpileOnly": true
  109. }
  110. }