๐ FAQ
Why you didnโt include ESLint plugins/rules for โXโ library?โ
- Cypress โ Donโt use Cypress. Use Playwright instead
- Testing library โ I believe Sheriff should not encourage wrong testing practices. In my opinion, Testing Library is one of the least efficient ways to test UIs, by principles. In most codebases, it does more harm than good. You can use Storybook to test components in isolation and Playwright for integration and end-to-end tests
- eslint-plugin-unused-imports โ Everything this plugin does is done better by Knip
import/no-unused-modules
โ This rule is slow and has many bugs, it is also hard to get working properly in most codebases. Instead, I recommend Knip
Is Sheriff compatible with โXโ?โ
Generally speaking, everything that is compatible with ESLint should also be compatible with Sheriff. That said, there are nuances:
-
Vite โ Compatible out of the box.
-
Next.js โ Sheriff has explicit support for Next.js. You can enable it in the Sheriff config options. You should not follow any of the steps provided on the Next.js website. Only follow Sheriffโs instructions
-
CRA โ Compatible. Just add this line to your
.env
file:.envDISABLE_ESLINT_PLUGIN=true
Does Sheriff support vanilla JavaScript codebases?โ
Sheriff is a TypeScript-first ESLint configuration. Itโs focused on TypeScript codebases. You can almost consider Sheriff a superset of typescript-eslint.
If your codebase is not written in TypeScript, you should worry about that first before concerning yourself with linting.
For this reason, vanilla JavaScript is not supported for now, although support may be added later.
Versioning Policyโ
Sheriff follows Semantic Versioning using Conventional Commits and Changesets. SemVer stipulates that projects should define their โpublic APIโ so that users can understand the impact of upgrading to a new version. If changes to your configuration are needed for it to continue functioning, we consider it to be a SemVer breaking change. If changes are not needed to your configuration, whether a change is a feature, a patch, or breaking change is determined on a case-by-case basis.