Registry / testing / repolinter

repolinter

JSON →
library0.12.0jsnpmunverified

Repolinter is a linter for open source repositories, checking for common issues like missing license, README, contributing guide, code of conduct, and changelog files. Version 0.12.0 is the latest stable release (May 2025) with TypeScript type definitions. It supports local and remote repository linting, customizable rulesets (JSON/YAML), and multiple output formats (default, JSON, Markdown). Compared to alternatives like `licensee` or `repo-scope`, Repolinter offers broader checks and integration with git repositories. Release cadence is irregular; last major change was v0.11.0 adding ruleset inheritance.

npm install repolinter
INSTALL
IMPORT
SIG · REPOLINTER
R
repolinter
testingjavascriptv0.12.0
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.

repolinter
✓ import { repolinter } from 'repolinter'
✗ const repolinter = require('repolinter')
Repolinter ships TypeScript types and can be used via ESM or CJS, but recommended import is ESM for bundlers.
runLint
✓ import { runLint } from 'repolinter'
The default export is a function that lints a given directory; use named import if using the programmatic API.
Repolinter
✓ import { Repolinter } from 'repolinter'
✗ import Repolinter from 'repolinter'
Repolinter class is a named export, not default. Common mistake is to try default import.

Demonstrates programmatic usage of runLint to lint a local repo and output JSON.

import { runLint } from 'repolinter'; import { resolve } from 'path'; async function main() { const targetDir = resolve('./my-repo'); const result = await runLint({ targetDir, rulesetFile: undefined, // will look for local config or default dryRun: false, format: 'json' }); console.log(JSON.stringify(result, null, 2)); } main().catch(console.error);
repolinter --version
Debug
Known issues
deprecatedThe '--git' flag is deprecated in favor of '--remote' in v0.11.0.
fix
Use '--remote' instead of '--git'.
affects: >=0.11.0
breakingVersion 0.9.0 introduced breaking changes in ruleset schema (version 2) and removed legacy configuration support.
fix
Update ruleset files to version 2 format (refer to schema).
affects: >=0.9.0
gotchaWhen using --format markdown, the output includes a full report with table, not just summary.
fix
Parse the markdown output accordingly; use --format json for structured data.
affects: >=0.10.0
Errors
Common errors & fixes
Error: Cannot find module 'repolinter'
Package not installed globally or locally.
fix
Run 'npm install -g repolinter' or add to devDependencies.
SyntaxError: Unexpected token 'export'
Using ESM import in a CommonJS environment.
fix
Use function require('repolinter') or set 'type': 'module' in package.json.
Error: ruleset must have a version field of type number
Ruleset file missing or invalid 'version' field.
fix
Add '"version": 2' to your repolinter.json.
Upgrade
Version history
0.12.0latest on npm
Audit
Dependencies
noderequiredRequires Node.js >= v12
Agent activity
4 hits · last 30 days
node
4
Resources
repolinter — npm install repolinter · libregistry