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

Integrate consistent code formatting #1073

Closed
ptomasroos opened this issue Mar 24, 2017 · 7 comments
Closed

Integrate consistent code formatting #1073

ptomasroos opened this issue Mar 24, 2017 · 7 comments

Comments

@ptomasroos
Copy link
Contributor

Type of issue

Improvement

Description

Prebid.js is a collaboration between multiple companies, many commits / PR are handling reintendations, formatting fixes ect. Instead of spending time of this we could do as many open source projects are these days, move on to a consistent formatting tool. My suggestion would be prettier which is sponsored by Facebook and getting a lot of attention these days. https://github.com/prettier/prettier

We use it internally and have a git prehook which causes people to run formatting either on save with files or via a npm run command to make sure that PR's that are entered is consistently formatted.

I'm happy to provide a PR if we consider this to be a good idea.

@mkendall07
Copy link
Member

@ptomasroos
Thanks for the suggestion. We do need this. I would be happy to review a PR for integrating to the project. One style convention we have is to prefer single quotes, and looks like the default is double quote. I'm not sure how to configure that on a project level though.

@ptomasroos
Copy link
Contributor Author

ptomasroos commented Mar 24, 2017 via email

@mkendall07
Copy link
Member

awesome!

@ptomasroos
Copy link
Contributor Author

An alternative could be to use https://standardjs.com/ as well. Might yield smaller amount of changes

@mkendall07
Copy link
Member

Seems like it might be worth a shot.

@ptomasroos ptomasroos changed the title Integrate prettier for consistent code formatting Integrate consistent code formatting Apr 4, 2017
@ptomasroos
Copy link
Contributor Author

Do you want me to give it a try with standardjs @mkendall07 ?

@matthewlane
Copy link
Collaborator

Closing with #1111 merged

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

No branches or pull requests

3 participants