Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Fail on fix (#52) #53

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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