1
0
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:
Kushagra Gour 2018-04-14 23:05:35 +05:30
parent eeba248038
commit f8b2a63285
3 changed files with 7 additions and 1 deletions

2
.prettierignore Normal file

@ -0,0 +1,2 @@
src/lib/
app/

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