{"id":26172,"library":"redlint","title":"Redlint","description":"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.","status":"active","version":"6.4.1","language":"javascript","source_language":"en","source_url":"https://github.com/putoutjs/redlint","tags":["javascript","putout","redlint","AST","babel","api","traverse","generate"],"install":[{"cmd":"npm install redlint","lang":"bash","label":"npm"},{"cmd":"yarn add redlint","lang":"bash","label":"yarn"},{"cmd":"pnpm add redlint","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"ESM-only since v6; no CommonJS support.","wrong":"const redlint = require('redlint')","symbol":"redlint","correct":"import redlint from 'redlint'"},{"note":"Named export; not a subpath export.","wrong":"const scan = require('redlint/scan')","symbol":"scan","correct":"import { scan } from 'redlint'"}],"quickstart":{"code":"import redlint from 'redlint';\nimport { scan } from 'redlint';\n\n// Initialize with default options\nconst lint = redlint();\n\n// Scan current directory\nconst results = await scan();\nconsole.log(results);\n\n// Or run via CLI: npx redlint scan\n","lang":"typescript","description":"Shows basic usage of redlint: import main module and scan function, then scan filesystem."},"warnings":[{"fix":"Upgrade Node to 22 or later.","message":"Node >=22 required. Older versions cause runtime errors.","severity":"breaking","affected_versions":">=6.0.0"},{"fix":"Use ESM imports (import redlint from 'redlint').","message":"v6.0.0 dropped CommonJS support. require() will fail.","severity":"breaking","affected_versions":">=6.0.0"},{"fix":"Run 'npx redlint scan' for scanning.","message":"CLI command changed: use 'redlint scan' instead of just 'redlint'. Running 'redlint' without subcommand opens interactive mode.","severity":"gotcha","affected_versions":">=5.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Switch to import statement or use dynamic import().","cause":"Using require() on ESM-only package.","error":"ERR_REQUIRE_ESM"},{"fix":"Run 'npx redlint' or install globally: 'npm i -g redlint'.","cause":"Global install missing or not in PATH.","error":"Command 'redlint' not found"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}