baldrick-tsconfig-es2021
v0.5.0
Published
Shared basic Typescript config for ES2021
Downloads
13
Maintainers
Readme
baldrick-tsconfig-es2021
Shared basic TypeScript config for ES2021
This is not an official base. It should support Node.js 14 and above, but should provide ES2021 support for ES modules.
It includes:
allowSyntheticDefaultImportsis activated (true) to provide backwards compatibility, Node.js allows you to import most CommonJS packages with a default import. This flag tells TypeScript that it's okay to use import on CommonJS modules (Sindre Sorhus)declarationis activated (true) and generate .d.ts files for every TypeScript or JavaScript file inside your project.esModuleInteropis activated (true) which should result in better support for import of dependencies regardless whether they areESorcommonjs.forceConsistentCasingInFileNamesis activated (true) and TypeScript will issue an error if a program tries to include a file by a casing different from the casing on disk.moduleDetectionis set toforcewhich ensures that every non-declaration file is treated as a module.newLineis set toLF(unix).noEmitOnErroris activated (true) and this will not emit compiler output files like JavaScript source code, source-maps or declarations if any errors were reported.noFallthroughCasesInSwitchis activated (true) and you get report errors for fallthrough cases in switch statements.noImplicitOverrideis activated (true) and you can ensure that the sub-classes never go out of sync, by ensuring that functions which override include the keywordoverride.noImplicitReturnsis activated (true) and TypeScript will check all code paths in a function to ensure they return a value.noPropertyAccessFromIndexSignatureis activated (true) and will raise an error when the unknown field uses dot syntax instead of indexed syntax.noUncheckedIndexedAccessis activated (true) and this will add undefined to any un-declared field in the type.noUnusedLocalsis activated (true) and you get report errors on unused local variables.noUnusedParametersis activated (true) and you get report errors on unused parameters in functions.resolveJsonModuleis deactivated (false) as TypeScript does not support resolving JSON files by default.skipLibCheckis activated (true) and skip type checking of declaration files.strictis activated (true) and enables a wide range of type checking behavior that results in stronger guarantees of program correctness.useDefineForClassFieldsis activated (true) and switches to the upcoming standard version of class fields runtime behavior.
Install
$ npm install --save-dev baldrick-tsconfig-es2021Usage
tsconfig.json
{
"extends": "baldrick-tsconfig-es2021"
}Other
This project was strongly inspired by Sindre Sorhus tsconfig
