Repolinter

raw JSON →
0.12.0 verified Fri May 01 auth: no javascript

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.

error Error: Cannot find module 'repolinter'
cause Package not installed globally or locally.
fix
Run 'npm install -g repolinter' or add to devDependencies.
error SyntaxError: Unexpected token 'export'
cause Using ESM import in a CommonJS environment.
fix
Use function require('repolinter') or set 'type': 'module' in package.json.
error Error: ruleset must have a version field of type number
cause Ruleset file missing or invalid 'version' field.
fix
Add '"version": 2' to your repolinter.json.
deprecated The '--git' flag is deprecated in favor of '--remote' in v0.11.0.
fix Use '--remote' instead of '--git'.
breaking Version 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).
gotcha When 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.
npm install repolinter
yarn add repolinter
pnpm add repolinter

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);