Skip to content

Commit

Permalink
Clarify warnIgnored descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
domnantas committed Sep 29, 2023
1 parent ed79f90 commit b005526
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions docs/src/use/command-line-interface.md
Expand Up @@ -110,7 +110,7 @@ Miscellaneous:
--env-info Output execution environment information - default: false
--no-error-on-unmatched-pattern Prevent errors when pattern is unmatched
--exit-on-fatal-error Exit with exit code 2 in case of fatal error - default: false
--no-warn-ignored Suppress warning when the file list includes ignored files. *Flat Config Mode Only*
--no-warn-ignored Suppress warnings when the file list includes ignored files. *Flat Config Mode Only*
--debug Output debugging information
-h, --help Show help
-v, --version Output the version number
Expand Down Expand Up @@ -706,7 +706,7 @@ npx eslint --exit-on-fatal-error file.js

#### `--no-warn-ignored`

**Flat Config Mode Only.** This option suppresses `File ignored by default / File ignored because of a matching ignore pattern` warnings when an ignored filename is passed explicitly. It is useful when paired with `--max-warnings 0` as it will prevent exit code 1 due to the aforementioned warning.
**Flat Config Mode Only.** This option suppresses both `File ignored by default` and `File ignored because of a matching ignore pattern` warnings when an ignored filename is passed explicitly. It is useful when paired with `--max-warnings 0` as it will prevent exit code 1 due to the aforementioned warning.

* **Argument Type**: No argument.

Expand Down
2 changes: 1 addition & 1 deletion lib/eslint/flat-eslint.js
Expand Up @@ -84,7 +84,7 @@ const LintResultCache = require("../cli-engine/lint-result-cache");
* when a string.
* @property {Record<string,Plugin>} [plugins] An array of plugin implementations.
* @property {"error" | "warn" | "off"} [reportUnusedDisableDirectives] the severity to report unused eslint-disable directives.
* @property {boolean} warnIgnored Show warning when the file list includes ignored files
* @property {boolean} warnIgnored Show warnings when the file list includes ignored files
*/

//------------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions lib/options.js
Expand Up @@ -55,7 +55,7 @@ const optionator = require("optionator");
* @property {string} [stdinFilename] Specify filename to process STDIN as
* @property {boolean} quiet Report errors only
* @property {boolean} [version] Output the version number
* @property {boolean} warnIgnored Show warning when the file list includes ignored files
* @property {boolean} warnIgnored Show warnings when the file list includes ignored files
* @property {string[]} _ Positional filenames or patterns
*/

Expand Down Expand Up @@ -147,7 +147,7 @@ module.exports = function(usingFlatConfig) {
option: "warn-ignored",
type: "Boolean",
default: "true",
description: "Suppress warning when the file list includes ignored files"
description: "Suppress warnings when the file list includes ignored files"
};
}

Expand Down

0 comments on commit b005526

Please sign in to comment.