From 1595fa5ddfb5ca1c858c0c58b87d1eb1373f3c2b Mon Sep 17 00:00:00 2001 From: Lukas Eipert Date: Thu, 29 Mar 2018 13:59:49 +0200 Subject: simplify prettier cli call --- scripts/frontend/prettier.sh | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/scripts/frontend/prettier.sh b/scripts/frontend/prettier.sh index 463145591d3..27b72405335 100755 --- a/scripts/frontend/prettier.sh +++ b/scripts/frontend/prettier.sh @@ -13,22 +13,18 @@ fi case $1 in check) action=check - prettier_args=--list-different files=staged ;; save) action=save - prettier_args=--write files=staged ;; check-all) action=check - prettier_args=--list-different files=all ;; save-all) action=save - prettier_args=--write files=all ;; *) @@ -46,7 +42,7 @@ else fi if [ "$action" == "check" ]; then - if $PRETTIER_PATH $prettier_args $file_list; then + if $PRETTIER_PATH --list-different $file_list; then echo -e "\nFormat of $files files is correct." exit 0 else @@ -56,7 +52,7 @@ if [ "$action" == "check" ]; then fi if [ "$action" == "save" ]; then - if $PRETTIER_PATH $prettier_args $file_list; then + if $PRETTIER_PATH --write $file_list; then echo -e "\nFormatted $files files successfully with prettier." exit 0 else -- cgit v1.2.1