TylerBrock / mongo-hacker

MongoDB Shell Enhancements for Hackers
tylerbrock.github.io/mongo-hacker
MIT License
1.79k stars 235 forks source link

Format code with prettier #210

Closed gianpaj closed 4 years ago

gianpaj commented 4 years ago

Environment

I'm looking to add a feature, but before, and in addition, I'd like to propose to format the JS code with prettier

For example: .prettierrc

{
    "tabWidth": 4,
    "useTabs": false,
    "printWidth": 120,
    "singleQuote": true
}

More options: https://prettier.io/docs/en/options.html

Happy to open a PR to discuss and determine which settings are the best for this project.

stennie commented 4 years ago

HI @gianpaj,

Given the generally low level of commit activity for this project I don't think there's a huge win in reformatting the code. Doing so may make the history harder to compare, which is probably a more important concern than prettiness at this stage.

However, if you want to submit a PR that would be helpful to see how significant the proposed changes would be.

I would also suggest looking at the new MongoDB Shell which is written using more modern JavaScript & conventions.

Cheers, Stennie

gianpaj commented 4 years ago

hey @stennie hope you're doing well down-under 🙃

The new MongoDB shell looks great! I'll take a look at it.

TylerBrock commented 4 years ago

Hey @gianpaj yep, I think those settings would be best and agree with @stennie