diff --git a/docs/ignore.md b/docs/ignore.md index ca0d9fb1c..1cca65e41 100644 --- a/docs/ignore.md +++ b/docs/ignore.md @@ -159,3 +159,13 @@ hello: world {{/my-crazy-component}} ``` + +## Command Line File Patterns + +For one-off commands, when you want to exclude some files without adding them to `.prettierignore`, negative patterns can come in handy: + +```bash +prettier --write . '!**/*.{js,jsx,vue}' +``` + +See [fast-glob](https://prettier.io/docs/en/cli.html#file-patterns) to learn more about advanced glob syntax.