From 0d7947cda346f4e67bf4fdb4676ec5c18d6f3759 Mon Sep 17 00:00:00 2001 From: Mark Brouch Date: Fri, 20 Dec 2019 10:39:44 -0600 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20Add=20documentation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/README.md b/README.md index c63fb84..79917e0 100644 --- a/README.md +++ b/README.md @@ -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 +```