#
Typescript
#
By project type configurations
Typically, TypeScript shareable configuration libraries are architectured around the idea that shared configurations should be small and composable to accomodate any potential use cases that a development team might encounter.
While composability provides flexibility, it also increases the complexity on the consumer side as they must understand how TypeScript configuration inheritance works and how to compose the provided shared configurations correctly. It can be frustrating at times when you want to get something up and running quickly.
To improve the experience, rather than delegating the composition of the shared configuration pieces to the consumer, we compose them internally and offer configurations by project type instead.
This way, it's pretty straightforward for the consumer to configure TypeScript, as it only involves extending a single shared configuration per project and it allows for more accurate defaults and assumptions about the target environment. For advanced users in need of flexibility, the underlying configuration pieces are also available.
#
Linting only
@workleap/typescript-configs
by project type shared configurations exclusively focus on code linting, as tsup is handling the transpilation process.
#
Target environment
@workleap/typescript-configs
by project type shared configurations targets the following environment:
- ESM
- ESNext
If you are in the process of migrating an existing project to @workleap/typescript-configs
, and would rather delay transitioning to ESM, refer to the custom configuration page for information about how to support non ESM projects.
#
Available configurations
#
Getting started
To get started, choose one of the following scenarios 👇
#
Setup a new project
If you are looking to setup a new polyrepo solution (single project per repository), follow the guide to setup a polyrepo, otherwise, follow the guide to setup a monorepo.
#
Setup an existing project
If you are migrating an existing polyrepo solution (single project per repository) to workleap/web-configs
, follow the guide to setup a polyrepo, otherwise, follow the guide to setup a monorepo.
Once configured, to understand how to adapt @workleap/typescript-configs
default configurations to your codebase while you are completing the migration, have a look at the custom configuration page.
#
Advanced configuration
If you are encountering a challenging use case making impractical the @workleap/typescript-configs
, have a look at the advanced composition page for documentation about how to compose the underlying configuration pieces of this library.