π FAQ
Why you didnβt include ESLint plugins/rules for βXβ library?β
- Cypress β Do not use Cypress. Use Playwright instead.
- Testing library β I believe that Sheriff should not encourage bad testing practices. In my opinion, Testing Library is one of the least efficient ways to test UIs, by principle. In most codebases, I have found it to do 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 particularly 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:
-
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. 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 is focused exclusively 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 worrying about linting.
For this reason, vanilla JavaScript is not supported as of right now, though 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.