From a6057cecdfe0a6455ee827075d36e986ec1fff16 Mon Sep 17 00:00:00 2001 From: Sylvan Mably Date: Mon, 20 May 2019 07:44:58 -0400 Subject: [PATCH] feat: add --check CLI option (#64) * chore: rename "write"/"format" to "process" * feat: add --check CLI option * docs: add --check to README * fix: squash bugs and clean up code * fix: rename onProcessFile back to onExamineFile --- README.md | 4 ++++ bin/pretty-quick.js | 11 +++++++++++ src/formatFiles.js | 27 --------------------------- src/index.js | 15 ++++++++++++--- src/processFiles.js | 36 ++++++++++++++++++++++++++++++++++++ 5 files changed, 63 insertions(+), 30 deletions(-) delete mode 100644 src/formatFiles.js create mode 100644 src/processFiles.js diff --git a/README.md b/README.md index b7f0709..67bece6 100644 --- a/README.md +++ b/README.md @@ -101,6 +101,10 @@ Outputs the name of each file right before it is proccessed. This can be useful Prevent `git commit` if any files are fixed. +### `--check` + +Check that files are correctly formatted, but don't format them. This is useful on CI to verify that all changed files in the current branch were correctly formatted. +