docs: how to ignore files using negative patterns (#10400)

This commit is contained in:
Georgii Dolzhykov authored and GitHub committed 2021-02-24 21:47:07 +02:00
1 parent 5682d2f440
commit 285c15ef08
1 file changed
+10
+10
View File
@@ -159,3 +159,13 @@ hello: world
{{/my-crazy-component}}
</div>
```
## 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.