universal AI-powered linter
raw JSON → 1.2.2 verified Fri May 01 auth: no javascript
Lint is a universal linter (v1.2.2) that wraps ESLint, Prettier, RuboCop, Biome, Ruff, and Oxlint into a single CLI with AI-powered code review. It supports all major languages and integrates with git hooks for pre-commit checks. The tool uses OpenAI/Anthropic APIs for intelligent fix suggestions and merges configuration from multiple tools. Released monthly, it differentiates by unifying disparate linters and offering AI-driven remediation.
Common errors
error Error: Cannot find module 'lint' ↓
cause Package not installed or ESM-only module required with require().
fix
npm install lint && use import instead of require.
error TypeError: lint is not a function ↓
cause Default import used instead of named import.
fix
Import { lint } from 'lint' instead of import lint from 'lint'.
error ERROR: 'linters' is not a valid option. Did you mean 'tools'? ↓
cause Using deprecated option name 'linters'.
fix
Replace 'linters' with 'tools'.
Warnings
breaking v1.0.0 removed support for Node 18. Minimum Node version is now 20. ↓
fix Upgrade Node to >=20.
breaking The 'linters' option was renamed to 'tools' in v1.2.0. ↓
fix Use 'tools' instead of 'linters'.
deprecated require('lint') is deprecated. Use ESM import instead. ↓
fix Replace require with import.
gotcha When using AI features, OpenAI API key must be set via environment variable or passed in options. Without key, AI fix suggestions are disabled. ↓
fix Set OPENAI_API_KEY or pass aiKey in options.
gotcha The 'fix' option only applies to ESLint and Prettier; other tools may require separate fix flags. ↓
fix Check tool-specific documentation for fix behavior.
Install
npm install lint yarn add lint pnpm add lint Imports
- lint wrong
const lint = require('lint')correctimport { lint } from 'lint' - lintFiles wrong
import { lintFiles } from 'lint/files'correctimport { lintFiles } from 'lint' - format wrong
import format from 'lint'correctimport { format } from 'lint'
Quickstart
import { lint } from 'lint';
const result = await lint({
files: ['src/**/*.{js,ts,jsx,tsx}'],
aiKey: process.env.OPENAI_API_KEY ?? '',
tools: ['eslint', 'prettier'],
fix: true
});
console.log(result.summary);