-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1986a37
commit 0d7947c
Showing
1 changed file
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,55 @@ | ||
# eslint-generate-todo | ||
Tool for generating eslint todo files | ||
|
||
# Installation | ||
|
||
```bash | ||
yarn add --dev eslint-generate-todo | ||
``` | ||
|
||
# Usage | ||
|
||
Generate a `.eslintrc-todo` file using the `eslint-generate-todo` CLI: | ||
|
||
```bash | ||
eslint-generate-todo | ||
``` | ||
|
||
You may then extend the resulting `.eslintrc-todo` file in your eslint config: | ||
|
||
```yaml | ||
extends: | ||
- .eslintrc-todo.yml | ||
``` | ||
## CLI | ||
Run `eslint-generate-todo` through the CLI with this script. Run it with `--help` to see the options. Files use glob syntax and may be specified multiple times. | ||
|
||
```bash | ||
eslint-generate-todo [files...] | ||
``` | ||
|
||
### `--format` | ||
|
||
If you want to specify the file format of the output `.eslintrc-todo` file, you can run `eslint-generate-todo` with the `--format` flag (or `-f`), followed by either `yaml` or `json`. By default `eslint-generate-todo` outputs to `yaml`. | ||
|
||
```bash | ||
eslint-generate-todo --format json | ||
``` | ||
|
||
### `--off` | ||
|
||
To set rule overrides in the generated `.eslintrc-todo` file to `"off"` instead of `"warn"`, you can run `eslint-generate-todo` with the `--off` (or `-o`) flag. | ||
|
||
```bash | ||
eslint-generate-todo --off | ||
``` | ||
|
||
### `--path` | ||
|
||
To change the output path of the generated `.eslintrc-todo` file, you can run `eslint-generate-todo` with the `--path` (or `p`) flag, followed by the project root-relative path. | ||
|
||
```bash | ||
eslint-generate-todo --path config/eslint-overrides.yml | ||
``` |