Skip to content

Minor linting updates#204

Merged
lemonmade merged 3 commits intomasterfrom
minor-linting-updates
Jul 14, 2016
Merged

Minor linting updates#204
lemonmade merged 3 commits intomasterfrom
minor-linting-updates

Conversation

@lemonmade
Copy link
Member

This PR makes a few small JavaScript linting/ styleguide updates:

  • Made it so that require-flow allows @flow to appear in a line comment (which is apparently allowed now).
  • Removed the requirement to omit the braces for arrow functions that have only a return statement and updated the guidance for them to suggest (but not require) omitting the braces for simple return-only arrow functions.
  • Turned off linting rules that enforced sorting of properties in React components. This was annoying in my experience and doesn't have the granularity to make it work well with class properties.
  • Turned off a rule that required you to use a default export when your module exports only one identifier. IMO some modules make more sense as groups of named exports (usually utility-like things), even if you currently only have one export from that group.

Thoughts? @GoodForOneFare @bouk @tessalt @Shopify/fed

README.md Outdated
really &&
(long || expression)
));
[1, 2, 3].map((x) => (x * x) + 1).filter((x) => x < 6);
Copy link
Member

Choose a reason for hiding this comment

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

Should .filter be on a new line?

@GoodForOneFare
Copy link
Member

👍 LGTM.

],
},
],
'react/sort-comp': 'off',
Copy link
Contributor

@bouk bouk Jul 13, 2016

Choose a reason for hiding this comment

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

🔥 this rule 👍

@lemonmade lemonmade merged commit de3bf51 into master Jul 14, 2016
@lemonmade lemonmade deleted the minor-linting-updates branch July 14, 2016 17:08
@tessalt
Copy link

tessalt commented Jul 20, 2016

can we get this released?

@lemonmade
Copy link
Member Author

@tessalt 13.0.0 released with all the linting changes, let me know if you have nay issues!

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.

4 participants