#
ESLint
#
By project type configurations
Typically, ESLint shareable configuration libraries are architectured around the idea that shared configurations should be small and composable to accommodate 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 ESLint core concepts 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 ESLint as it only involves extending a single shared configuration per project and it allows for more accurate defaults and assumptions about the target environment.
#
Target environment
@workleap/eslint-configs by project type shared configurations targets the following environment:
- ESM
- ESNext
- Node
#
Available configurations
#
Prettier
For a complete explanation of why we chose to stick with ESLint for stylistic rules rather than migrating to Prettier, read the following article.
#
Getting started
#
Setup a project
If you are looking to setup a polyrepo solution (single project per repository), follow the Setup a polyrepo guide. To setup a monorepo solution managed with Turborepo, follow the Setup with Turborepo guide.
Once configured, to understand how to adapt @workleap/eslint-configs default configurations to your codebase, have a look at the custom configuration page.
#
Migrate from ESLint 8
If your project currently uses @workleap/eslint-plugin, follow the migration guide to upgrade.
After completing the migration, you can further customize @workleap/eslint-configs to fit your codebase by following the custom configuration guide.