Add prettier.js to project

This commit is contained in:
George Drummond 2019-01-23 16:57:39 -05:00
parent 88e4a99b03
commit 20604e6ca9
No known key found for this signature in database
GPG Key ID: 296DD6077123BF17
4 changed files with 13 additions and 0 deletions

View File

@ -35,6 +35,7 @@
"jest-serializer-vue": "^2.0.2",
"node-sass": "^4.9.2",
"parcel-bundler": "^1.10.3",
"prettier": "^1.16.1",
"vue-template-compiler": "2.5.15"
},
"browserslist": [

5
prettier.config.json Normal file
View File

@ -0,0 +1,5 @@
{
"trailingComma": "es5",
"semi": false,
"singleQuote": true
}

View File

@ -4,6 +4,8 @@ FILES_TO_FORMAT="atst/ tests/ app.py script/"
if [ "$1" == "check" ]; then
pipenv run black --check ${FILES_TO_FORMAT}
yarn run prettier --check "js/**/*.js" --config ./prettier.config.json
else
pipenv run black ${FILES_TO_FORMAT}
yarn run prettier --write "js/**/*.js" --config ./prettier.config.json
fi

View File

@ -6755,6 +6755,11 @@ preserve@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
prettier@^1.16.1:
version "1.16.1"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.16.1.tgz#534c2c9d7853f8845e5e078384e71973bd74089f"
integrity sha512-XXUITwIkGb3CPJ2hforHah/zTINRyie5006Jd2HKy2qz7snEJXl0KLfsJZW/wst9g6R2rFvqba3VpNYdu1hDcA==
pretty-format@^23.6.0:
version "23.6.0"
resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-23.6.0.tgz#5eaac8eeb6b33b987b7fe6097ea6a8a146ab5760"