Skip to content

Commit

Permalink
feat: Fail on fix (prettier#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
josejulio committed Dec 13, 2018
1 parent 157d4b1 commit 0383a5e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Expand Up @@ -92,6 +92,10 @@ When not in `staged` pre-commit mode, use this flag to compare changes with the

Outputs the name of each file right before it is proccessed. This can be useful if Prettier throws an error and you can't identify which file is causing the problem.

## `--bail`

Prevent `git commit` if any files are fixed.

<!-- Undocumented = Unsupported :D
### `--config`
Expand Down
1 change: 1 addition & 0 deletions bin/pretty-quick.js
Expand Up @@ -36,6 +36,7 @@ prettyQuick(

onWriteFile: file => {
console.log(`✍️ Fixing up ${chalk.bold(file)}.`);
if (args.bail) success = false;
},

onExamineFile: file => {
Expand Down

0 comments on commit 0383a5e

Please sign in to comment.