Skip to main content

Full v9 compatibility achieved internally

· 2 min read
Andrea Pontrandolfo
Sheriff author, Tech Lead @ Velasca
Sheriff BlogPost PosterSheriff BlogPost Poster

Sheriff release v25

This release introduces key updates to Sheriff:

ESLint v9 APIs Compatibility

Sheriff now fully supports ESLint v9 APIs for all plugins. Take a look at the milestone to see how we got there.

There were some problematic plugins that could cause crashes in some instances, like eslint-plugin-react-hooks and eslint-plugin-import.

Now, all plugins have been updated to their ESlint v9-compatible versions, resolving these issues.

Added eslint-plugin-remeda

Added support for Remeda with eslint-plugin-remeda.

If you use Remeda instead of Lodash, you should disable lodash in the config and enable remeda.

eslint.config.js
import sheriff from "eslint-config-sheriff";
import { defineFlatConfig } from "eslint-define-config";

const sheriffOptions = {
react: false,
next: false,
astro: false,
lodash: false,
remeda: true,
playwright: false,
jest: false,
vitest: false,
};

export default defineFlatConfig([...sheriff(sheriffOptions)]);

Unified Type Exports

The types that were previously exported from @sherifforg/types are now exported directly from eslint-config-sheriff.

The @sherifforg/types package is now deprecated. You can safely remove it and update your imports accordingly.

Native TypeScript support for configuration files

Sheriff has moved away from eslint-ts-patch and adopted ESLint’s native support for TypeScript configuration files.

You can enable it by setting unstable_ts_config in CLI commands and IDE settings.

New syntax for bootstrapping Sheriff projects

Now you can run pnpm create @sherifforg/config instead of pnpm dlx create-sheriff-config to bootstrap a new Sheriff project.

Minor improvements

  • Astro linting is now configurable.
  • The SheriffOptions object is now optional. If not specified, all options will default to false.
  • General fixes and improvements to the CLI. The experience should be much smoother now.
  • Reworked the noRestrictedSyntaxOverride option.
  • Exposed useful variables from the main package.

For more details, see the release notes.

Acknowledgments

A shout-out to all the people that contributed to these releases, and a special big thanks to lishaduck for his help on a lot of issues and PRs!

How to Contribute

Sheriff thrives on community support. Here is how you can help:

  • Contribute and Share Feedback: Fix bugs, suggest features, improve documentation, or join discussions. Start contributing today!
  • Give a Star: Find Sheriff useful? ⭐ the project on GitHub to show your support.

Your support helps Sheriff move forward. Thank you!