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

standardize JS semi-colon style in backend #2847

Conversation

jacobherrington
Copy link
Contributor

This is a pretty low priority PR. I noticed that semi-colon usage was pretty erratic in the JS. It seemed that generally it was preferable to end statements with a semi-colon, so I went ahead and tried to standardize that across all of the JS.

Copy link
Contributor

@ericsaupe ericsaupe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! Personally, I don't like to put them but I think you're right that where Solidus is right now semicolons seem to be the norm.

@tvdeyen
Copy link
Member

tvdeyen commented Sep 19, 2018

Semicolons are totally optional in Javascript, that’s why I think we should not change a bunch of source files. It does not provide any benefit but adding noise to git blame. And that alone is reason enough to reject this change.

But, I think we should think about adding JS linting to our workflow. But this is a whole different story.

For the scope if this PR I think we should not do it.

@jacobherrington
Copy link
Contributor Author

@tvdeyen That's fair, totally agree with turning this down in favor of adopting some kind of linter. I feel like there are a lot of opportunities to increase our code quality, particularly in JS.

@jacobherrington
Copy link
Contributor Author

Opened #2849 in response to this feedback. Would love to hear some opinions there so that we can do something about JS code quality. Thanks! 👍

@ericsaupe
Copy link
Contributor

@tvdeyen how is this different than the rubocop -a git changes? This is simply a manual lint change. I can see not doing it in favor of a proper solution for #2849 which would be just like the rubocop -a changes but I think code clean up, even in small commits, is valuable.

@tvdeyen
Copy link
Member

tvdeyen commented Sep 19, 2018

@ericsaupe the difference is that we proposing a change here that would preferable be disabled in a linter (because semicolons are optional even in JS) and we did not care in the past and should not continue to care about them. Being too strict with linters can harm contributions. We want only the bare minimum of style linting as possible. The same reasons why we have lots of Rubcops disabled.

IMO We should:

  1. Set up JS linting
  2. Disable all checks
  3. Enable one check
  4. Fix the issues
  5. Repeat from 3

That's how we did it with Rubocop and this is how we should do this with JS linting.

@ericsaupe
Copy link
Contributor

Should we close this PR in favor of the solution to #2849?

@jacobherrington
Copy link
Contributor Author

Sounds good to me @ericsaupe

@aitbw aitbw mentioned this pull request May 23, 2019
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants