Improve the --list-different example
- Use double quotes for Windows support. - Use the long flag for readability. - Show that you should pass in your formatting options as well.
This commit is contained in:
1 parent
0a5d035a85
commit
c2a3d23133
1 file changed
+1
-1
@@ -170,7 +170,7 @@ Note that `--write` cannot be used with `--debug-check`.
|
||||
Another useful flag is `--list-different` (or `-l`) which prints the filenames of files that are different from Prettier formatting. If there are differences the script errors out, which is useful in a CI scenario.
|
||||
|
||||
```bash
|
||||
prettier -l './src/**/*.js'
|
||||
prettier --single-quote --list-different "src/**/*.js"
|
||||
```
|
||||
|
||||
#### Pre-commit hook for changed files
|
||||
|
||||
Reference in new issue
Block a user