Redlint

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

Redlint (v6.4.1) is a filesystem linter that uses Putout to transform a JSON representation (.filesystem.json) of your filesystem and apply changes directly. It supports scanning and fixing file naming, structure, and organization rules via Putout plugins for madrun, package.json, ESM, TypeScript, and more. Active development with monthly releases. Requires Node >=22. Unique differentiator: lints filesystem structure as a JSON file, not just code.

error ERR_REQUIRE_ESM
cause Using require() on ESM-only package.
fix
Switch to import statement or use dynamic import().
error Command 'redlint' not found
cause Global install missing or not in PATH.
fix
Run 'npx redlint' or install globally: 'npm i -g redlint'.
breaking Node >=22 required. Older versions cause runtime errors.
fix Upgrade Node to 22 or later.
breaking v6.0.0 dropped CommonJS support. require() will fail.
fix Use ESM imports (import redlint from 'redlint').
gotcha CLI command changed: use 'redlint scan' instead of just 'redlint'. Running 'redlint' without subcommand opens interactive mode.
fix Run 'npx redlint scan' for scanning.
npm install redlint
yarn add redlint
pnpm add redlint

Shows basic usage of redlint: import main module and scan function, then scan filesystem.

import redlint from 'redlint';
import { scan } from 'redlint';

// Initialize with default options
const lint = redlint();

// Scan current directory
const results = await scan();
console.log(results);

// Or run via CLI: npx redlint scan