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.
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.
-
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
npx @sushichan044/eslint-todoAdd --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.
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
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.
Want to use JSON?
Sure!
{
"$schema": "node_modules/@sushichan044/eslint-todo/config-schema.json",
"correct": {
"limit": {
"count": 30,
"type": "violation"
}
}
}eslint-todo provides some useful tools to AI Agents via MCP.
You mus specify --mcp and --root <root path>.
update .vscode/mcp.json in your workspace:
{
"servers": {
"eslint-todo": {
"type": "stdio",
"command": "npx",
"args": [
"@sushichan044/eslint-todo",
"--mcp",
"--root",
"${workspaceFolder}"
]
}
}
}