tsconfig.base.json 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  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-fixture/*": ["tests/js/fixtures/*"],
  89. "sentry-test/*": ["tests/js/sentry-test/*"],
  90. "sentry-images/*": ["static/images/*"],
  91. "sentry-locale/*": ["src/sentry/locale/*"],
  92. "sentry-logos/*": ["src/sentry/static/sentry/images/logos/*"],
  93. "sentry-fonts/*": ["static/fonts/*"]
  94. },
  95. "plugins": [
  96. // The styled plugin provides language server autocompletion for styled
  97. // component template strings
  98. { "name": "@styled/typescript-styled-plugin" }
  99. ]
  100. },
  101. "include": ["../static/app", "../tests/js"],
  102. "exclude": ["../node_modules", "../**/*.benchmark.ts"],
  103. "ts-node": {
  104. "transpileOnly": true
  105. }
  106. }