Skip to content
This repository has been archived by the owner on Jul 27, 2018. It is now read-only.

Setup standard to enforce style on new code #1241

Merged
merged 1 commit into from Aug 24, 2016

Conversation

Gozala
Copy link
Contributor

@Gozala Gozala commented Aug 19, 2016

Fixes #1240

This change configures eslint on top of eslint-config-standard which is then configured to workaround following issues preventing us using from stock standard package:

  1. space-infix-ops reports polymorphic functions:
    space-infix-ops reports polymorphic functions babel/babel-eslint#366
  2. no-duplicate-imports rule triggered by import type:
    no-duplicate-imports rule triggered by import type statements standard/standard#599

All of the currently tracked fils are also listed under .eslintignore so that current code will not be listed until we get to reformat it.

@tschneidereit
Copy link
Contributor

I'm fine with this overall, except for one major thing: I'm very strongly opposed to the "no semicolos" rule. The vast majority of existing code does use semicolons, meaning that people (including myself) use it as a visual aide when scanning code. It might well be that there are no technical reasons for not using semicolons as long as you adhere to a bunch of other rules. The same is true for, e.g., almost all whitespace, though, and doesn't mean it's a good idea.

I know that there's a substantial set of people preferring not to use semicolons, but from what I can tell they are still a significant minority.

FWIW, I generally vastly prefer a "more traditional" style such as airbnb's, but given how fruitless style discussions are, let's not engage in them where it's not needed. The semicolons thing I think is an important decision.

@paulrouget
Copy link
Contributor

I agree with Till.

@Gozala
Copy link
Contributor Author

Gozala commented Aug 24, 2016

After discussing this in the meeting we have decided to give it a try & maybe review this decision in the future.

@Gozala Gozala merged commit 57c446b into browserhtml:master Aug 24, 2016
Gozala added a commit to Gozala/browser.html that referenced this pull request Aug 24, 2016
Gozala added a commit to Gozala/browser.html that referenced this pull request Aug 24, 2016
Gozala added a commit that referenced this pull request Aug 24, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Setup standardjs to enforce it's style on new files
3 participants