-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
docs: add more examples to flat config ignores docs #18020
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
Conversation
✅ Deploy Preview for docs-eslint ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
docs/src/use/configure/ignore.md
Outdated
]; | ||
``` | ||
|
||
Patterns that end with `/` can match only directories. Patterns that don't end with `/` can match both files and directories. For example, this config ignores all files in and under `build` directory except for files named `test.js`: |
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 example is really difficult to follow. I don't think this paragraph properly introduces what is happening in the config below. Can you make this more explicit?
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 now pushed a new version with more details about the example.
Co-authored-by: Nicholas C. Zakas <[email protected]>
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!
A text file is much easier to edit than an array. https://github.com/prettier/prettier/blob/b267831086617320f39086c0c704c5a1477fcaa2/eslint.config.js#L257-L261 |
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:
Fixes #17964
What changes did you make? (Give an overview)
Added a note that ignore pattern like
build/**
also ignores directorybuild/
. Also added few more examples.Is there anything you'd like reviewers to focus on?