Registry / testing / eslint-config-sheriff

eslint-config-sheriff

JSON →
library31.3.0jsnpmunverified

eslint-config-sheriff is a comprehensive and opinionated TypeScript-first ESLint configuration. Version 31.3.0 is the latest stable release, with frequent updates (minor/patch releases weekly). It integrates over 20 ESLint plugins including Prettier, Playwright, JSDoc, Lodash, SonarJS, Unicorn, React, Next.js, and Storybook. Unlike generic ESLint configs, Sheriff provides strict defaults out of the box and requires minimal setup. It ships with TypeScript types and supports ESLint 9+ flat config. Maintained actively, with a dedicated website and CLI tool for scaffolding.

testingdevops
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Package is ESM-only since v31.0.0. CommonJS require will fail.

import { sheriffConfig } from 'eslint-config-sheriff'

Since v31.1.0, defineConfig is re-exported from ESLint's built-in module, not from sheriff. This was changed to align with ESLint recommended patterns.

import { defineConfig } from 'eslint/config'

Shows how to import and configure sheriffConfig with optional framework support in an ESLint flat config file.

// eslint.config.js import { sheriffConfig } from 'eslint-config-sheriff'; import { defineConfig } from 'eslint/config'; export default defineConfig([ ...sheriffConfig({ react: true, next: true, astro: false, playwright: false, jest: false, vitest: false, }), ]);
sheriff --version
Debug
Known footguns
breakingSince v31.0.0, the package has been ESM-only. CommonJS require() will fail.
breakingSince v31.1.0, defineConfig must be imported from 'eslint/config' not from 'eslint-config-sheriff'.
breakingSince v29.1.0, the build tool changed from tsup to tsdown, potentially affecting edge cases with dual CJS/ESM support.
deprecatedUsing require() to load the config is deprecated since v30.0.0 and removed in v31.0.0.
gotchaThe config expects certain peer dependencies to be installed (e.g., @typescript-eslint/parser, eslint-plugin-react).
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
9 hits · last 30 days
gptbot
4
ahrefsbot
4
script
1
Resources