Skip to main content

πŸ“š 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:

    .env
    DISABLE_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.