Skip to main content

Ruleset design

Sheriff doesn't offer โ€œrecommendedโ€ or โ€œstrictโ€ presets. This config contains a predefined set of rules meant to act as guidelines for a functional-light programming style.

Sheriff tries to be as faithful to Javascript as possible and conceives Typescript as a tool to enhance the capabilities that Javascript already has. Becuase of this, Sheriff discourages typescript-only features, like enums and overloads (and classes, and decorators by extensions, even though they also landed in Ecmascript).

If you just donโ€™t like 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.

But if you decide to adopt this config, you should trust it and let it do itโ€™s thing.
If you end up fighting it all the way, maybe reconsider about whether or not adopting it. There are some pretty big hot-takes in this config. Learn more in the Stylistic choices explanations section. Also in the FAQs there are even more hot-takes, if you are into that ๐ŸŒถ๏ธ.