mirror of
https://github.com/chinchang/web-maker.git
synced 2025-04-27 22:25:02 +02:00
add prettier configs
This commit is contained in:
parent
eeba248038
commit
f8b2a63285
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
|
||||
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
|
||||
|
||||
# Fetch .js or .json filed from staged files
|
||||
|
Loading…
x
Reference in New Issue
Block a user