Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Also fix prettier.sh to work when spaces are in path of prettier.
- Loading branch information
Showing
3 changed files
with
11 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,3 +14,4 @@ test | |
changelog.md | ||
tmp | ||
.babelrc | ||
.prettierrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"semi": false, | ||
"bracketSpacing": false, | ||
"printWidth": 120, | ||
"singleQuote": true, | ||
"trailingComma": "es5" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
#!/bin/bash | ||
|
||
PRETTIER="`npm bin`/prettier --no-semi --no-bracket-spacing --print-width 120 --single-quote --trailing-comma es5" | ||
PRETTIER="`npm bin`/prettier" | ||
|
||
if [ "$1" == "check" ]; then | ||
echo "Running prettier check. Files that should be formatted (shouldn't be any):" | ||
$PRETTIER --list-different '{src,configs,test}/**/*.js' '*.js' | ||
"$PRETTIER" --list-different '{src,configs,test}/**/*.js' '*.js' | ||
else | ||
echo "Running prettier formatter on files:" | ||
$PRETTIER --write '{src,configs,test}/**/*.js' '*.js' | ||
"$PRETTIER" --write '{src,configs,test}/**/*.js' '*.js' | ||
fi |