Ruleset design
No complex presetsβ
Sheriff doesnβt offer βrecommendedβ or βstrictβ presets. This config contains a predefined set of rules meant to act as guidelines for a lightly functional programming style.
No esoteric Typescript-only featuresβ
Sheriff tries to be as faithful to JavaScript as possible, and views TypeScript as a tool to enhance the capabilities that JavaScript already has. Because of this, Sheriff discourages TypeScript-only features, like enums and overloads (and classes, and decorators by extension, even though they also landed in ECMAScript).
Minimal formatting opinionsβ
Unlike other ESLint configurations, Sheriff tries to be as unopinionated as possible about formatting, to be aligned with the community philosophy on the matter.12
Sheriff encourage you to bring your own formatting tool.
The only formatting rules that Sheriff currently enforces are @stylistic/padding-line-between-statements
and curly
.
Opinionated but flexibleβ
If you just dislike some rules, you can disable them on a case-by-case basis.
If you want to adopt a more OOP programming style, or if you feel like the config is too strict, you can disable everything that bothers you.
If you decide to adopt this config, you should try to trust it and let it do itβs thing.
If you end up fighting it all the way, you may want to reconsider adopting it.
There are some pretty hot takes in this config. Learn more in the stylistic choices section. There are even more hot-takes in the FAQs, if you are into that πΆοΈ.