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. Milestone.

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 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 now 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 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.

Compliance with the native Typescript support for the eslint.config.ts file

Sheriff moved away from eslint-ts-patch and adopted the native support for TypeScript in the eslint.config.ts file.

You can enable it by setting unstable_ts_config, both in the CLI commands and in the VSCode extension settings.

New syntax for bootstrapping Sheriff projects

Now you can do 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 better now.
  • reworked the noRestrictedSyntaxOverride option
  • exposed more useful variables from the main package

For more details, see the release notes.

Acknowledgments

Shoutout to all the people that contributed to these releases and special big thanks to lishaduck for his big 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: Found Sheriff useful? ⭐ the project on GitHub to show your support.

Your support helps Sheriff move forward. Thank you!