1 |
|
2 |
|
3 | PRETTIER="`npm bin`/prettier --no-semi --no-bracket-spacing --print-width 120 --single-quote --trailing-comma es5"
|
4 |
|
5 | if [ "$1" == "check" ]; then
|
6 | echo "Running prettier check. Files that should be formatted (shouldn't be any):"
|
7 | $PRETTIER --list-different '{src,configs,test}/**/*.js' '*.js'
|
8 | else
|
9 | echo "Running prettier formatter on files:"
|
10 | $PRETTIER --write '{src,configs,test}/**/*.js' '*.js'
|
11 | fi
|