Registry / devops / monolinter

monolinter

JSON →
library1.0.5jsnpmunverified

Monolinter is a CLI tool for validating consistency across multiple package.json files in a monorepo (or single project). It checks for consistent package versions, duplicate package declarations, fuzzy version usage, and related package version matches. Current stable version is 1.0.5. Release cadence is low; last release was minor. Key differentiator: modular, extensible with custom validation modules, and designed for CI/CD integration. Alternatives like syncpack focus on version sync but monolinter also catches duplicates and related packages.

npm install monolinter
INSTALL
IMPORT
SIG · MONOLINTER
M
monolinter
devopsjavascriptv1.0.5
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

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

monolinter CLI
yarn monolinter
npx monolinter
Install as devDependency and run via yarn or npm scripts. npx may work but not guaranteed.
programmatic API
import { Monolinter } from 'monolinter';
const monolinter = require('monolinter');
Package is not explicitly ESM, but default export is available. TypeScript types included.
config file
.monolinterrc (JSON, YAML, or JS via cosmiconfig)
monolinter.config.ts
cosmiconfig supports .monolinterrc, .monolinterrc.json, .monolinterrc.yaml, monolinter.config.js, etc.

Shows basic usage with config file and CLI arguments, including example validation errors.

// Create .monolinterrc in project root: { "include": ["package.json", "packages/*/package.json"] } // Add script to package.json: { "scripts": { "lint:mono": "monolinter" } } // Run: yarn lint:mono // Or run directly: yarn monolinter package.json 'packages/*/package.json' // Sample output on failure: // ✖ Found inconsistent versions for 'lodash': 4.17.0 vs 4.17.21 // ✖ Duplicate 'express' in dependencies and devDependencies of server/package.json // ✖ App/package.json uses fuzzy version '^1.0.0' for 'debug'
monolinter --version
Debug
Known issues
gotchaGlob patterns must match relative path from config file location
fix
Use relative paths from the directory containing .monolinterrc or the root where CLI is run.
affects: >=1.0.0
gotchaExact version validator rejects packages without version (e.g., file: or git dependencies)
fix
Exclude packages that use non-semver versions via exclude patterns in config.
affects: >=1.0.0
breakingVersion 1.0.4 removed peer dependencies on @babel/core and @babel/runtime
fix
No migration needed; those packages are no longer required.
affects: >=1.0.4
deprecatedESLint-related checks were added in 1.0.3 but not documented; may change in future
fix
Check changelog for updates on related package validation.
affects: >=1.0.3
Errors
Common errors & fixes
Cannot find module 'cosmiconfig'
Missing peer dependency cosmiconfig
fix
Add cosmiconfig as a devDependency: yarn add -D cosmiconfig
TypeError: Cannot read property 'match' of undefined
A package.json file lacks a 'version' field (for exact version check)
fix
Ensure all included package.json files have a 'version' field, or exclude them from exact version validation.
No configuration found. Create a .monolinterrc file.
Monolinter cannot find any config file in the project root.
fix
Create a .monolinterrc file with at least an 'include' array.
Upgrade
Version history
1.0.5latest on npm
Audit
Dependencies
cosmiconfigrequiredloading .monolinterrc configuration files
typescriptrequiredtype definitions and compilation (listed as devDependency but required for runtime)
Agent activity
7 hits · last 30 days
node
6
Amazon
1
Resources
monolinter — npm install monolinter · libregistry