Add support for .css and .scss
This commit is contained in:
@@ -21,6 +21,10 @@ function sniff_file_type () {
|
|||||||
file_type="jsx"
|
file_type="jsx"
|
||||||
elif [[ $ff == *.tsx ]] ; then
|
elif [[ $ff == *.tsx ]] ; then
|
||||||
file_type="tsx"
|
file_type="tsx"
|
||||||
|
elif [[ $ff == *.css ]] ; then
|
||||||
|
file_type="css"
|
||||||
|
elif [[ $ff == *.scss ]] ; then
|
||||||
|
file_type="scss"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo $file_type
|
echo $file_type
|
||||||
|
|||||||
@@ -18,7 +18,9 @@ if [[ $file_type == "javascript" || \
|
|||||||
$file_type == "php" || \
|
$file_type == "php" || \
|
||||||
$file_type == "html" || \
|
$file_type == "html" || \
|
||||||
$file_type == "jsx" || \
|
$file_type == "jsx" || \
|
||||||
$file_type == "tsx" ]] ; then
|
$file_type == "tsx" || \
|
||||||
|
$file_type == "css" || \
|
||||||
|
$file_type == "scss" ]] ; then
|
||||||
out=$(npx prettier --write $file)
|
out=$(npx prettier --write $file)
|
||||||
retval="$?"
|
retval="$?"
|
||||||
success_retval=0
|
success_retval=0
|
||||||
|
|||||||
@@ -18,7 +18,9 @@ if [[ $file_type == "javascript" || \
|
|||||||
$file_type == "php" || \
|
$file_type == "php" || \
|
||||||
$file_type == "html" || \
|
$file_type == "html" || \
|
||||||
$file_type == "jsx" || \
|
$file_type == "jsx" || \
|
||||||
$file_type == "tsx" ]] ; then
|
$file_type == "tsx" || \
|
||||||
|
$file_type == "css" || \
|
||||||
|
$file_type == "scss" ]] ; then
|
||||||
out=$(npx prettier --check $file 2>&1 > /dev/null)
|
out=$(npx prettier --check $file 2>&1 > /dev/null)
|
||||||
retval="$?"
|
retval="$?"
|
||||||
success_retval=0
|
success_retval=0
|
||||||
|
|||||||
Reference in New Issue
Block a user