Merged
Conversation
| 'id-match': 'off', | ||
| // This option sets a specific tab width for your code | ||
| 'indent': ['warn', 2], | ||
| 'indent': ['warn', 2, {SwitchCase: 1, MemberExpression: 1}], |
Contributor
|
I disagree with indenting case statements. Unindented is the standard style in every other language, so I don't see why we should go against that |
you have to admit that this looks very strange. Text editors when set to JS also indent case statements by default, so there's some differences set for JS vs other languages |
Contributor
|
It looks weird because you're putting brackets around case statements, which you don't need to (I've never seen that done before?) |
|
We enforce the brackets to ensure lexical declarations only apply to a particular case: http://eslint.org/docs/rules/no-case-declarations |
Contributor
|
whatever, I don't care enough about the case thing, |
02728b1 to
c9f36cd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR makes a few small updates to our linting config:
indentrule to forcecasestatements and member expressions nested on multiple lines to be indented one level (2 spaces). Currently,caseis not supposed to be indented, and we have no lint rule that dictates multiline member expressions.type-id-matchrule for flow to require all flow types to match<Something>(Type|Props|State|Context), which I found to be a good setting to use for React stuff.'${foo}', since this is probably an error).cc/ @Shopify/javascript