Use use prettier wrapper script to reformat

This commit is contained in:
Michael Wolf
2023-09-20 07:38:42 -06:00
parent 4e5f5b1855
commit 607140cce3

View File

@@ -11,6 +11,8 @@ file="$1"
file_type=$(sniff_file_type $file) file_type=$(sniff_file_type $file)
export WOULD_REFORMAT=do_reformat
if [[ $file_type == "javascript" || \ if [[ $file_type == "javascript" || \
$file_type == "vue" || \ $file_type == "vue" || \
$file_type == "css" || \ $file_type == "css" || \
@@ -22,7 +24,7 @@ if [[ $file_type == "javascript" || \
$file_type == "css" || \ $file_type == "css" || \
$file_type == "scss" || \ $file_type == "scss" || \
$file_type == "sh" ]]; then $file_type == "sh" ]]; then
out=$(npx prettier --write $file) out=$("$(wfroot "$DIR")"/./prettier.sh "$file")
retval="$?" retval="$?"
success_retval=0 success_retval=0
elif [[ $file_type == "python" ]]; then elif [[ $file_type == "python" ]]; then