Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@focusaurus
Copy link
Contributor

Impact: minor
Type: chore

Issue

There's one small discrepancy between our defined eslint rules and our (default, it seems) prettier config. eslint wants arrow function arguments always wrapped in parentheses, whereas prettier omits them for single-argument arrow functions.

What this means is if you autoformat your source code with prettier, sometimes it will fail eslint due to this discrepancy.

Solution

Add prettier config to package.json to always wrap arrow function arguments in parens.

Breaking changes

None

Testing

Mostly N/A as this is a tooling issue, but if we start seeing lint errors after running prettier, let me know.

@focusaurus focusaurus self-assigned this Dec 13, 2018
@focusaurus focusaurus requested a review from nnnnat December 13, 2018 20:58
@focusaurus focusaurus merged commit 2d3a090 into release-2.0.0-rc.8 Dec 14, 2018
@focusaurus focusaurus deleted the chore-pete-prettier-arrow-parens branch December 14, 2018 16:38
@spencern spencern mentioned this pull request Jan 8, 2019
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.

2 participants