Sherif is an opinionated, zero-config linter specifically designed for TypeScript and JavaScript monorepos. Written in Rust for speed, it efficiently enforces consistency and prevents common regressions across multiple packages without requiring `node_modules` to be installed. It supports all major package managers (PNPM, Bun, NPM, Yarn) and is ideal for CI/CD environments. The current stable version is 1.11.1, with frequent minor releases indicating active development. Its key differentiators include its zero-configuration approach, high performance due to its Rust implementation, and comprehensive monorepo-specific rules, such as checking for multiple dependency versions or package manager consistency.
npm install sherif-linux-x64Verified import paths — ran on the pinned version, not inferred.
Demonstrates how to set up Sherif in a monorepo's root `package.json` with scripts for linting and autofixing, including basic configuration options. It shows invoking Sherif via a `package.json` script.
Update your GitHub Actions workflow to use `actions/setup-node@v4` or higher with `node-version: 24` or ensure your runner environment provides Node.js v24.
To fix issues in CI, run Sherif locally with `--fix`. If you need to perform an autofix step in CI (e.g., as part of a pre-commit check), you must explicitly run it in a non-CI environment or manage the changes outside the typical linting flow.
Always pin the Sherif version in your CI scripts and GitHub Actions workflows to ensure consistent behavior across builds.
Use the `--fail-on-warnings` flag (or `failOnWarnings: true` in `package.json` config) to force Sherif to exit with code `1` if any warnings are found, ensuring stricter CI enforcement.
In non-interactive environments, use the `--select highest` or `--select lowest` flag in conjunction with `--fix` to automatically choose the highest or lowest version for all conflicting dependencies. This bypasses the interactive prompt.
Ensure you are using `npx sherif` (or `pnpm dlx sherif`, `bunx sherif`, `yarn dlx sherif`) to run the command without global installation. Verify your `PATH` if attempting a direct global execution.
Autofix should be run locally by developers before committing code. If an autofix step is required in CI, it usually indicates a deviation from best practices for CI/CD or needs to be explicitly enabled in a non-standard way (not recommended).
Run `sherif --fix` to interactively select a canonical version for each conflicting dependency. For non-interactive environments, use `sherif --fix --select highest` or `sherif --fix --select lowest` to automatically resolve conflicts.
Update your workflow to use `actions/setup-node@v4` (or newer) to configure Node.js v24 for the action or ensure the GitHub Actions runner environment provides Node.js 24.
No dependency data recorded yet.