Skip to content

Commit

Permalink
Introduce --quiet-ignored flag
Browse files Browse the repository at this point in the history
This flag is an alternative to `--quiet`, which suppresses _all_
warnings, rather than just "ignored files".
  • Loading branch information
Evan Jacobs committed Aug 18, 2016
1 parent 8e758b9 commit 94a7a35
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,22 @@ browserify your_file.js -t eslintify

### "quiet" mode

Functionally equivalent to the [ESLint CLI](http://eslint.org/docs/user-guide/command-line-interface) flag `--quiet`: it causes warnings to be silently ignored. The default is for warnings to be outputted along with errors.
Functionally equivalent to the [ESLint CLI](http://eslint.org/docs/user-guide/command-line-interface) flag `--quiet`: it causes _all_ warnings to be silently ignored. The default is for warnings to be outputted along with errors.

```bash
browserify your_file.js -t [ eslintify --quiet ]
```

If you only wish to suppress "ignored file" warnings, use the `--quiet-ignored` flag instead.

### "ignored file" warnings

If you choose to exclude files via `.eslintignore` or elsewhere and the linter is run over them (due to them being in the globbing path), it will produce a warning. `eslint@3` introduced a way for these unnecessary warnings to be suppressed; the implementation in this module is as follows:

```bash
browserify your_file.js -t [ eslintify --quiet-ignored ]
```

### "continuous" mode

If you wish to get linting reports in the console but not break the build, enable "continuous mode" like so:
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function lint(file, options) {
}

function end() {
var results = cli.executeOnText(data, file).results;
var results = cli.executeOnText(data, file, !options['quiet-ignored']).results;

if (options.quiet) {
results = eslint.CLIEngine.getErrorResults(results);
Expand Down

0 comments on commit 94a7a35

Please sign in to comment.