New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: indicate eslintrc mode for .eslintignore
#18285
Conversation
✅ Deploy Preview for docs-eslint ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
--ignore-pattern [String] Pattern of files to ignore (in addition to those in .eslintignore) | ||
--ignore-pattern [String] Patterns of files to ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This option also works with legacy config, so this info might still be useful for those users depending upon the config.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've updated the texts as suggested by @nzakas. Does the new wording look good to you?
@@ -426,7 +426,7 @@ npx eslint --no-ignore file.js | |||
|
|||
#### `--ignore-pattern` | |||
|
|||
This option allows you to specify patterns of files to ignore (in addition to those in `.eslintignore`). | |||
This option allows you to specify patterns of files to ignore. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably say "In eslintrc mode, these are in addition to .eslintignore
."
.eslintignore
.eslintignore
lib/options.js
Outdated
@@ -261,7 +261,7 @@ module.exports = function(usingFlatConfig) { | |||
{ | |||
option: "ignore-pattern", | |||
type: "[String]", | |||
description: "Patterns of files to ignore", | |||
description: "Patterns of files to ignore. In eslintrc mode, these are in addition to `.eslintignore`", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of always displaying this, can we use the usingFlatConfig
variable to only show "these are in addition to .eslintignore" when using eslintrc?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've changed it so the original text will be printed in eslintrc mode. In flat config mode, the notice about .eslintignore
will be omitted.
Co-authored-by: Nicholas C. Zakas <nicholas@humanwhocodes.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks!
Prerequisites checklist
What is the purpose of this pull request? (put an "X" next to an item)
[X] Documentation update
[ ] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofix to a rule
[ ] Add a CLI option
[ ] Add something to the core
[ ] Other, please explain:
What changes did you make? (Give an overview)
Updated descriptions of the
--ignore-pattern
CLI flag to clarify that.eslintignore
only applies in eslintrc mode. In the new config system, ignore patterns are defined in the config.Is there anything you'd like reviewers to focus on?