Warning
This tool only supports ESLint Flat Config with ES Module.
If you want to use this tool to migrate to ESLint Flat Config, create the Flat Config first and then run eslint-todo
.
Simple tool to temporarily disable existing ESLint violations like .rubocop_todo.yml
in RuboCop.
This allows existing offending files to be excluded from the check on a rule-by-rule basis, which may be helpful when making destructive changes to ESLint settings.
pnpm install @sushichan044/eslint-todo
-
Add
eslint-todo
config to youreslint.config.js
.+ import { eslintConfigTodo } from '@sushichan044/eslint-todo/eslint'; export default [ // your existing, + await eslintConfigTodo(), ]
-
Run
eslint-todo
to generate ESLint Todo file. By default, it will generate.eslint-todo.js
file.[!NOTE] Run this command at the directory where your
eslint.config.js
is located.pnpm exec eslint-todo
-
Add
.eslint-todo.js
to your ignore files like.prettierignore
.// .prettierignore + .eslint-todo.js
default: process.cwd()
You can specify the directory where .eslint-todo.js
will be generated.
Warning
You should place eslint.config.js
on the specified directory.
default: .eslint-todo.js
You can specify the name of the ESLint Todo file.
ESLint Todo file is like this.
This object is used to disable ESLint rules for specific files.
Note
In the future, a feature to correct only auto-fixable violations will be added.
/* eslint-disable */
/**
* Auto generated file by eslint-todo. DO NOT EDIT MANUALLY.
*/
export default {
"no-undef": {
autoFix: false,
files: ["bin/eslint-todo.mjs"],
},
};