diff options
author | Lukas Eipert <git@leipert.io> | 2018-03-29 13:59:49 +0200 |
---|---|---|
committer | Lukas Eipert <git@leipert.io> | 2018-03-29 13:59:49 +0200 |
commit | 1595fa5ddfb5ca1c858c0c58b87d1eb1373f3c2b (patch) | |
tree | 5ce09edc5749f43bc8a70b47ab36964b8a5bc570 | |
parent | 46ed2b8fde6192f0975cf73ea7d34c6f7c5c3b51 (diff) | |
download | gitlab-ce-44771-prettier-seems-to-ignore-the-overrides.tar.gz |
simplify prettier cli call44771-prettier-seems-to-ignore-the-overrides
-rwxr-xr-x | scripts/frontend/prettier.sh | 8 |
1 files 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 |