New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use prettier-check to check if all files are formatted with prettier #910

Merged
merged 2 commits into from Jul 20, 2017

Conversation

Projects
None yet
4 participants
@kunall17
Contributor

kunall17 commented Jul 20, 2017

On running npm run test:prettier prints error like this

> ZulipMobile@0.9.0 test:prettier /Users/kunall17/Project/react/zulip-mobile
> prettier-check  --single-quote --jsx-bracket-same-line --trailing-comma all --print-width 100 --parser flow `find src -name "*.js"`

Forgot to run prettier? There are files without correct code style:
src/users/userSelectors.js

npm ERR! code ELIFECYCLE
npm ERR! errno 3
npm ERR! ZulipMobile@0.9.0 test:prettier: `prettier-check  --single-quote --jsx-bracket-same-line --trailing-comma all --print-width 100 --parser flow `find src -name "*.js"``
npm ERR! Exit status 3
npm ERR! 
npm ERR! Failed at the ZulipMobile@0.9.0 test-pretty script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/kunall17/.npm/_logs/2017-07-20T06_14_27_790Z-debug.log

And if everything is fine:

> ZulipMobile@0.9.0 test-pretty /Users/kunall17/Project/react/zulip-mobile
> prettier-check  --single-quote --jsx-bracket-same-line --trailing-comma all --print-width 100 --parser flow `find src -name "*.js"`

All files using prettier code style.

@smarx

This comment has been minimized.

smarx commented Jul 20, 2017

Automated message from Dropbox CLA bot

@kunall17, it looks like you've already signed the Dropbox CLA. Thanks!

@borisyankov

This comment has been minimized.

Contributor

borisyankov commented Jul 20, 2017

Cool.

@borisyankov borisyankov merged commit 01cf03f into zulip:master Jul 20, 2017

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage remained the same at 42.275%
Details

@zulipbot zulipbot removed the needs review label Jul 20, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment