@sushichan044/eslint-todo
v0.2.6
Published
A simple tool to gradually resolve a large number of ESLint violations.
Downloads
3,014
Readme
@sushichan044/eslint-todo
A simple tool to gradually resolve a large number of ESLint violations.
It allows you to temporarily disable violations and fix them at your own pace.
[!CAUTION] This library will be subject to destructive changes based on ESLint bulk suppressions.
Installation
npm install --save-dev eslint @sushichan044/eslint-todoRequires:
- ES Module
- ESLint:
^8.57.0 || ^9.0.0- Flat Config Required
- If you are using legacy config, you must migrate into flat config first.
- Utilities like @eslint/compat can help you.
- Node.js:
^20.12.0 || ^22.0.0 || >=24.0.0- May work in Deno, but not tested.
Getting Started
Add
eslint-todoconfig at the bottom of your configs. Do not forgetawait.// example: eslint.config.js + import eslintConfigTodo from '@sushichan044/eslint-todo/eslint'; export default [ // your existing configs, + ...(await eslintConfigTodo()) ]Run
eslint-todoto generate ESLint Todo file at the directory whereeslint.config.jsis placed.npx @sushichan044/eslint-todo
Usage
1. Generate ESLint Todo file to temporarily suppress existing violations
npx @sushichan044/eslint-todo2. Correct ignored errors
Add --correct flag to launch eslint-todo with correct mode.
In this mode, you can make suppressed violations detectable again according to flexible conditions.
For example, to resolve 40 violations from any rule other than @typescript-eslint/no-explicit-any, specify it as follows.
eslint-todo --correct \
--correct.autoFixableOnly false \
--correct.partialSelection \
--correct.exclude.rules '@typescript-eslint/no-explicit-any' \
--correct.limit.count 40 \
--correct.limit.type violationThis will allow ESLint to detect the errors again, enabling you to have them fixed by AI or other tools.
Configuration
Configuration via CLI flags
You can config eslint-todo by passing a flag to the CLI.
Use npx eslint-todo --help to see all available options.
[!WARNING] If you specified any config via CLI flags, your config file will be ignored completely.
Exceptionally, these flags have no effect on this behavior:
--correct--mcp
Configuration File
Just create eslint-todo.config.{js,ts}:
// example: eslint-todo.config.ts
import { defineConfig } from '@sushichan044/eslint-todo/config';
export default defineConfig({
correct: {
limit: {
count: 30,
type: "violation",
},
},
});You can check all available options at here.
Sure!
{
"$schema": "node_modules/@sushichan044/eslint-todo/config-schema.json",
"correct": {
"limit": {
"count": 30,
"type": "violation"
}
}
}Use as MCP server (Experimental)
eslint-todo provides some useful tools to AI Agents via MCP.
You mus specify --mcp and --root <root path>.
Setup for VSCode
update .vscode/mcp.json in your workspace:
{
"servers": {
"eslint-todo": {
"type": "stdio",
"command": "npx",
"args": [
"@sushichan044/eslint-todo",
"--mcp",
"--root",
"${workspaceFolder}"
]
}
}
}