0.1.1 ā€¢ Published 4 years ago

eslint-auto-gen-config v0.1.1

Weekly downloads
52
License
MIT
Repository
github
Last release
4 years ago

eslint-auto-gen-config

Automatically Generated ESLint Configuration.

Usage

generate todo config

$ eslint `folder or file` | npx eslint-auto-gen-config > .eslintrc.todo.json

add .eslintrc.json

"extends": [
    "./.eslintrc.todo.json"
]

example

$ cat src/index.js
var a = 'a';
console.log(a);
$ eslint src

/Users/path/to/src/index.js
  1:1  error    Unexpected var, use let or const instead  no-var
  2:1  warning  Unexpected console statement              no-console

āœ– 2 problems (1 error, 1 warning)
  1 error, 0 warnings potentially fixable with the `--fix` option.

error Command failed with exit code 1.
$ eslint src | eslint-auto-gen-config
error Command failed with exit code 1.
{
  "overrides": [
    {
      "files": "src/index.js",
      "rules": {
        "no-var": 0,
        "no-console": 0
      }
    }
  ]
}