sinshutu / eslint-todo-generator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

eslint-todo-generator

Generates an exception list and adds it to your eslintrc.

Install

$ npm i --save-dev eslint-todo-generator

Usage

Run command in the project path.

$ eslint-todo-generator -f json 'src/**/*'

You need to add the generated .eslintrc-todo.(json|yaml) to the extends of eslintrc.

{
  ...
  "extends": [
    "eslint:recommended",
    ".eslintrc-todo.json"
  ]
}

Options

Options Description
-w --warn Create a to-do list with rules set to warn instead of off.
-f --format format setting, json or yaml.

Note

If project have specific eslint rules, you need to change a existing setting. The reason is .eslintrc-todo need to be loaded last.

{
  ...
  "extends": [
    "eslint:recommended",
    ".eslintrc-project-custom-rules.json",
    ".eslintrc-todo.json"
  ]
}

Licence

MIT

Author

sinshutukibotu

About

License:MIT License


Languages

Language:TypeScript 80.5%Language:JavaScript 19.5%