Update --ignore-path docs for clarity (#18917)

Co-authored-by: fisker <lionkay@gmail.com>
This commit is contained in:
Stuart Langridgeandfisker authored and GitHub committed 2026-06-03 05:13:40 +08:00
1 parent a3dc357645
commit 0926c3e9c4
1 file changed
+3 -2
+3 -2
View File
@@ -126,8 +126,9 @@ If you don’t have a configuration file, or want to ignore it if it does exist,
## `--ignore-path`
Path to a file containing patterns that describe files to ignore. By default, Prettier looks for `./.gitignore` and `./.prettierignore`.\
Multiple values are accepted.
Path to a file containing patterns that describe files to ignore. By default, Prettier looks for `./.gitignore` and `./.prettierignore`.
Multiple values are accepted by providing multiple `--ignore-path` options: `prettier --ignore-path=foo-ignore --ignore-path=bar-ignore`. Specifying an `--ignore-path` overrides the default rather than adding to it, so to add a new ignore file while keeping `./.gitignore` and `./.prettierignore` as well, specify `prettier --ignore-path=.gitignore --ignore-path=.prettierignore --ignore-path=foo-ignore`.
## `--list-different`