Guest User

tsconfig for plugin

a guest
Jun 1st, 2022
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 2.90 KB | None | 0 0
  1. {
  2.   "compilerOptions": {
  3.     "baseUrl": "/home/ec2-user/osd",
  4.     "paths": {
  5.       // Allows for importing from `opensearch-dashboards` package for the exported types.
  6.       "opensearch-dashboards": ["./opensearch_dashboards"],
  7.       "opensearch-dashboards/public": ["src/core/public"],
  8.       "opensearch-dashboards/server": ["src/core/server"],
  9.       "plugins/*": ["src/legacy/core_plugins/*/public/"],
  10.       "test_utils/*": [
  11.         "src/test_utils/public/*"
  12.       ],
  13.       "fixtures/*": ["src/fixtures/*"],
  14.       "@opensearch-project/opensearch": ["node_modules/@opensearch-project/opensearch/api/new"]
  15.     },
  16.     // Support .tsx files and transform JSX into calls to React.createElement
  17.     "jsx": "react",
  18.     // Enables all strict type checking options.
  19.     "strict": true,
  20.     // save information about the project graph on disk
  21.     "incremental": true,
  22.     // enables "core language features"
  23.     "lib": [
  24.       "esnext",
  25.       // includes support for browser APIs
  26.       "dom"
  27.     ],
  28.     // Node 8 should support everything output by esnext, we override this
  29.     // in webpack with loader-level compiler options
  30.     "target": "esnext",
  31.     // Use commonjs for node, overridden in webpack to keep import statements
  32.     // to maintain support for things like `await import()`
  33.     "module": "commonjs",
  34.     // Allows default imports from modules with no default export. This does not affect code emit, just type checking.
  35.     // We have to enable this option explicitly since `esModuleInterop` doesn't enable it automatically when ES2015 or
  36.     // ESNext module format is used.
  37.     "allowSyntheticDefaultImports": true,
  38.     // Emits __importStar and __importDefault helpers for runtime babel ecosystem compatibility.
  39.     "esModuleInterop": true,
  40.     // Resolve modules in the same way as Node.js. Aka make `require` works the
  41.     // same in TypeScript as it does in Node.js.
  42.     "moduleResolution": "node",
  43.     // "resolveJsonModule" allows for importing, extracting types from and generating .json files.
  44.     "resolveJsonModule": true,
  45.     // Disallow inconsistently-cased references to the same file.
  46.     "forceConsistentCasingInFileNames": true,
  47.     // Forbid unused local variables as the rule was deprecated by ts-lint
  48.     "noUnusedLocals": true,
  49.     // Provide full support for iterables in for..of, spread and destructuring when targeting ES5 or ES3.
  50.     "downlevelIteration": true,
  51.     // import tslib helpers rather than inlining helpers for iteration or spreading, for instance
  52.     "importHelpers": true,
  53.     // adding global typings
  54.     "types": [
  55.       "node",
  56.       "jest",
  57.       "react",
  58.       "flot",
  59.       "@testing-library/jest-dom",
  60.       "resize-observer-polyfill"
  61.     ]
  62.   },
  63.   "include": [
  64.     "public/**/*.ts",
  65.     "public/**/*.tsx",
  66.     "server/**/*.ts",
  67.     "../../../typings/**/*",
  68.   ],
  69.   "exclude": [],
  70.   "references": [
  71.     { "path": "../../core/tsconfig.json" }
  72.   ]
  73. }
  74.  
Advertisement
Add Comment
Please, Sign In to add comment