π§ Prior art
Why yet another ESLint config?β
As you may have noticed, plenty of ESLint configurations in the wild already exist
(have a look here or here).
None of these projects share the same goals of Sheriff.
Sheriff has a particular vision.
The main needs that led to its creation are a need for:
- Breezy setup and use (thanks to
@sherifforg/cli
). - Ease of customization (thanks to the βflatβ configuration format).
- Sensible defaults based on years of real world experience in production scenarios.
After exploring every possible alternative, I came to the conclusion that none of the other options where close to what I needed for my projects and everyday use. That is why I opted for making Sheriff.
Related projectsβ
Standard ESLint configsβ
eslint-config-airbnb
(comparison)@antfu/eslint-config
(comparison)eslint-config-canonical
eslint-config-hardcore
eslint-config-galex
eslint-config-everywhere
eslint-prettier-typescript-config
ESLint wrappersβ
These tools are not just sharable ESLint configs, but are wrappers for ESLint (and sometimes Prettier) that have their own CLI and their Editor integrations.
In-depth comparisonsβ
The main technical difference between Sheriff and the other projects is
that Sheriff is updated to the most recent version of ESLint and supports the new βflatβ configuration format
instead of relying on hacks like as @rushstack/eslint-patch
.
Because of the technical limitation imposed by this hack, these configs are harder to work with at multiple levels.
Another key difference is that the design of most of these configs seems to revolve around the idea of stuffing as many rules as possible into the config,
regardless of the quality of the plugins.
Sheriff instead was shaped around solid principles and only includes the rules that let it achieve its goals.
Sheriff features unique goodies and little niceties that other libraries lack. For a quick glance at the differences between Sheriff and some of the other popular ESLint configurations mentioned above, have a look at the table below.
Feature comparison tableβ
Feature | sheriff | eslint-config-airbnb | standard | eslint-config-standard | @antfu/eslint-config | XO | eslint-config-canonical | eslint-kit | eslint-config-galex | eslint-config-hardcore |
---|---|---|---|---|---|---|---|---|---|---|
FlatConfig | β | β | β | β | β | β | β | β | β | β |
Maintained | β | β | β | β | β | β | β | β | β | β |
Customizable | β | β | β | β | β | β | β | β | β | β |
Rich Docs | β | β | β | β | β | β | β | β | β | β |
Functional programming | β | β | β | β | β | β | β | β | β | β |
Advanced ignores management | β | β | β | β | β | β | β | β | β | β |
Learning curve | π |