Skip to content
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

Pretty-quick error if JSON file is empty #28

Closed
valvic66 opened this issue May 4, 2018 · 5 comments
Closed

Pretty-quick error if JSON file is empty #28

valvic66 opened this issue May 4, 2018 · 5 comments
Labels
question Further information is requested

Comments

@valvic66
Copy link

valvic66 commented May 4, 2018

Hello,

We created a new package with lerna and storybook that generates an empty config.js by default and pretty-quick crashes in this case.
Is this the way to behave if the file has no code inside?

"prettier": "prettier --write \"packages/**/src/**/*.{ts,tsx,scss,json,js}\"",
"prettyquick": "pretty-quick",

Best regards.

@azz
Copy link
Member

azz commented May 9, 2018

Unable to reproduce this. Here's what I tried:

$ yarn init  -y
$ git init
$ echo node_modules > .gitignore
$ yarn add prettier pretty-quick
$ touch x.js
$ git add x.js
$ yarn pretty-quick
🔍  Finding changed files since git revision null.
🎯  Found 1 changed file.
✅  Everything is awesome!
✨  Done in 0.54s.

@azz azz added the question Further information is requested label May 9, 2018
@valvic66
Copy link
Author

valvic66 commented May 9, 2018

Thank you for your reply.
pretty-quick crashes in case of an empty json file (initially mentioned Config.js by mistake).
In our case empty file: Config.json

@azz azz changed the title Pretty-quick error if js file is empty Pretty-quick error if JSON file is empty May 9, 2018
@valvic66
Copy link
Author

valvic66 commented May 9, 2018

Thanks so much. Awaiting a fix.

@azz
Copy link
Member

azz commented May 9, 2018

Closing this issue as there's nothing to do in this repo.

@azz azz closed this as completed May 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants