Use use prettier wrapper script to reformat
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user