Overview
Runs linters with structured output grouped by rule and file. Auto-detects linter type and formats output for maximum token efficiency.Syntax
Arguments
Linter name:
eslint, ruff, pylint, mypy, or omit to auto-detect from first arg.Files or directories to lint. Defaults to current directory.
Supported Linters
JavaScript/TypeScript - ESLint
- JSON output parsing
- Grouped by rule
- File-level summaries
- Top 10 rules shown
Python - Ruff
- JSON output parsing
- Grouped by rule code
- File context preserved
- Auto-detects
ruff checksubcommand
Python - Pylint
- JSON2 output format
- Grouped by symbol (rule)
- Message IDs shown (e.g., W0612)
- Type breakdown (errors, warnings, conventions)
Python - Mypy
- Text output parsing
- Grouped by file and error code
- Context lines preserved
Output Format
ESLint Example
Ruff Example
Pylint Example
Auto-Detection
RTK detects Python vs JavaScript linters: Python linters (installed via pip/pipx):ruff,pylint,mypy,flake8- Invoked directly:
Command::new("ruff")
eslint,biome- Invoked via package manager:
npx eslintorpnpm exec eslint
Token Savings
| Linter | Savings |
|---|---|
| ESLint | 84% |
| Ruff | 80% |
| Pylint | 82% |
| Mypy | 80% |
| Generic | 70% |
Tee Output Recovery
On failure (linting errors found), full output is saved:Exit Codes
Preserves linter exit codes:0- No issues found1- Linting errors found2- Configuration or runtime error
Related Commands
rtk prettier- Format checker (70% savings)rtk tsc- TypeScript compiler (83% savings)rtk cargo clippy- Rust linter (80% savings)rtk err- Generic error filter
