TypeScript configuration templates for various environments.
Install the @4mbl/tsconfig
npm package.
npm install -D @4mbl/tsconfig
Create a tsconfig.json
file in the root of your project and extend the desired tsconfig
template.
{
"extends": "@4mbl/tsconfig/node/latest"
/* your custom settings */
}
There are currently three tsconfig
templates.
This is the base tsconfig
file that is used by the other templates. It contains the basic configuration for TypeScript without any environment specific settings.
Extends the base template and adds settings specific to Node.js.
Extends the base template and adds settings specific to browser and React applications.
The package and each template are versioned separately. Seperate versioning allows you to update the package without worrying about breaking changes to the templates. It also allows you to easily test newer versions of the templates by just changing the extends
field in the tsconfig
file of your project.
The package itself follows the following versioning scheme: major.minor.patch
-
major
- Base template is changed and older template versions may be removed. -
minor
- Non-base template is changed or added. -
patch
- Non-breaking changes to the templates.
If you are extending a specific version of a template in your project, you can update the package without worrying about any breaking changes to your project.
Each template is versioned separately. The versioning scheme is: major.minor.patch
-
major
- Major overhaul of the template. Major changes to upstream templates warrant a major version on the inheriting templates. -
minor
- Breaking changes to the template. -
patch
- Non-breaking changes to the template.
Each template also has a latest
version. However, it is not recommended to extend the latest
version in your project as it may introduce breaking changes when the package is updated.