mirror of
https://github.com/chinchang/web-maker.git
synced 2025-07-07 07:02:42 +02:00
add prettier configs
This commit is contained in:
2
.prettierignore
Normal file
2
.prettierignore
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
src/lib/
|
||||||
|
app/
|
4
.prettierrc
Normal file
4
.prettierrc
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"singleQuote": true,
|
||||||
|
"useTabs": true
|
||||||
|
}
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# RUN PRETTIER
|
# RUN PRETTIER
|
||||||
filesToPrettify=$(git diff --staged --name-only | grep ".*\.\(js\|json\|css\|md\)")
|
filesToPrettify=$(git diff --staged --name-only | grep ".*\.\(js\|json\|css\|md\)")
|
||||||
echo "$fileToPrettify" | xargs ./node_modules/.bin/prettier --single-quote --use-tabs --write
|
echo "$fileToPrettify" | xargs ./node_modules/.bin/prettier --config ./prettierrc --write
|
||||||
echo "$fileToPrettify" | xargs git add
|
echo "$fileToPrettify" | xargs git add
|
||||||
|
|
||||||
# Fetch .js or .json filed from staged files
|
# Fetch .js or .json filed from staged files
|
||||||
|
Reference in New Issue
Block a user