kibana/tsconfig.base.json
Mikhail Shustov e9e0ca3782
Introduce TS incremental builds & move src/test_utils to TS project (#76082)
* move test_helpers to the core

* create base tsconfig

* all tsconfigs use the base one

* use test_helpers exposed from the src/core

* move getFieldFormatsRegistry to data plugin

* add test_utils project

* compile types after checkout

* add a stub for platform tsconfig.json

* fix broken import

* fix broken path to the base config

* set tsBuildInfoFile for project without outDir

* do not commit tsbuildinfo file

* do not check output d.ts files

* fix type error

* use separate config to build types

* rollback changes to include paths

* mute import zone error

* rename files to avoid references to tsd

* do not use tsd for type tests

* include all ts files in project

* run buildRefs before type check to ensure the latest version

* store tsbuildinfo locally

* update paths to base config

* comment out core/tsconfig.json

* remove ui path

* fix wrong tsbuildinfo path
2020-09-03 14:20:04 +02:00

61 lines
2.3 KiB
JSON

{
"compilerOptions": {
"baseUrl": ".",
"paths": {
// Allows for importing from `kibana` package for the exported types.
"kibana": ["./kibana"],
"kibana/public": ["src/core/public"],
"kibana/server": ["src/core/server"],
"plugins/*": ["src/legacy/core_plugins/*/public/"],
"test_utils/*": [
"src/test_utils/public/*"
],
"fixtures/*": ["src/fixtures/*"]
},
// Support .tsx files and transform JSX into calls to React.createElement
"jsx": "react",
// Enables all strict type checking options.
"strict": true,
// save information about the project graph on disk
"incremental": true,
// enables "core language features"
"lib": [
"esnext",
// includes support for browser APIs
"dom"
],
// Node 8 should support everything output by esnext, we override this
// in webpack with loader-level compiler options
"target": "esnext",
// Use commonjs for node, overridden in webpack to keep import statements
// to maintain support for things like `await import()`
"module": "commonjs",
// Allows default imports from modules with no default export. This does not affect code emit, just type checking.
// We have to enable this option explicitly since `esModuleInterop` doesn't enable it automatically when ES2015 or
// ESNext module format is used.
"allowSyntheticDefaultImports": true,
// Emits __importStar and __importDefault helpers for runtime babel ecosystem compatibility.
"esModuleInterop": true,
// Resolve modules in the same way as Node.js. Aka make `require` works the
// same in TypeScript as it does in Node.js.
"moduleResolution": "node",
// Disallow inconsistently-cased references to the same file.
"forceConsistentCasingInFileNames": true,
// Forbid unused local variables as the rule was deprecated by ts-lint
"noUnusedLocals": true,
// Provide full support for iterables in for..of, spread and destructuring when targeting ES5 or ES3.
"downlevelIteration": true,
// import tslib helpers rather than inlining helpers for iteration or spreading, for instance
"importHelpers": true,
// adding global typings
"types": [
"node",
"jest",
"react",
"flot",
"jest-styled-components",
"@testing-library/jest-dom"
]
}
}