Registry / devops / sherif

sherif

JSON →
library1.11.1jsnpmunverified

Sherif is an opinionated, zero-config linter designed specifically for TypeScript and JavaScript monorepos. It aims to standardize the developer experience (DX) and prevent regressions by enforcing a predefined set of rules across multiple packages within a single repository. Written in Rust for performance, Sherif operates efficiently without requiring `node_modules` to be installed, supporting all major package managers including PNPM, Bun, NPM, and Yarn. The current stable version is 1.11.1, with frequent minor releases indicating active development and maintenance. Key differentiators include its zero-configuration approach, cross-package manager compatibility, high execution speed, and robust autofix capabilities which can be run interactively or non- interactively via a `--select` flag for consistent dependency versioning.

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

Sherif is a command-line interface (CLI) tool. This command executes the linter directly via a package manager runner (npx, bunx, pnpm dlx, yarn dlx). Pinning a specific version (e.g., `@1.11.1`) is recommended for consistent behavior in CI environments.

npx sherif@latest

Runs Sherif with automatic fixing for most identified issues. When fixing `multiple-dependency-versions`, this flag will prompt for selections unless `--select` is also used. Note that autofix is disabled by default in CI environments.

npx sherif@latest --fix

Used in conjunction with `--fix`, the `--select highest` or `--select lowest` flag automatically resolves `multiple-dependency-versions` conflicts without interactive prompts, making it suitable for non-interactive environments like CI.

npx sherif@latest --fix --select highest

Demonstrates `sherif` configuration in `package.json` for linting and autofixing monorepo issues, along with example `scripts` for execution.

{ "name": "my-monorepo-root", "private": true, "workspaces": [ "packages/*" ], "scripts": { "lint:monorepo": "sherif", "lint:monorepo:fix": "sherif --fix --select highest" }, "sherif": { "failOnWarnings": true, "ignoreRule": ["root-package-manager-field"], "rules": { "multiple-dependency-versions": true, "unsync-similar-dependencies": true } } } // To run the linting: // npx sherif@latest // or using the script defined above: // npm run lint:monorepo // To run the autofix: // npm run lint:monorepo:fix
sherif --version
Debug
Known footguns
breakingThe GitHub Action for Sherif was upgraded to use Node.js 24. Users relying on older Node.js versions in their CI might experience build failures if not updated.
gotchaAutofixing with the `--fix` flag is automatically disabled in CI environments (when the `$CI` environment variable is set). This prevents unintended modifications in automated workflows.
gotchaSherif will exit with an error code (1) if any errors are found, but exits with code 0 for warnings. To make warnings also cause a failure, the `--fail-on-warnings` flag is needed.
gotchaRunning `sherif@latest` in CI environments can introduce regressions if a new version with breaking changes or new rules is released. It's best practice to pin a specific version.
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
28 hits · last 30 days
chatgpt-user
9
ahrefsbot
4
gptbot
3
bytedance
3
googlebot
2
oai-searchbot
2
script
1
bingbot
1
mj12bot
1
meta-externalagent
1
Resources