Skip to content
This repository has been archived by the owner on Jan 9, 2019. It is now read-only.

Add space before parent always for async arrows #19

Merged
merged 1 commit into from
Apr 25, 2018

Conversation

sirreal
Copy link
Member

@sirreal sirreal commented Apr 25, 2018

Add a rule for async arrow paren spacing which is error for calypso-prettier formatted code.
Example:

/home/circleci/wp-calypso/client/state/test/utils.js
841:67 error Unexpected space before function parentheses space-before-function-paren
855:67 error Unexpected space before function parentheses space-before-function-paren
869:62 error Unexpected space before function parentheses space-before-function-paren
885:62 error Unexpected space before function parentheses space-before-function-paren
https://circleci.com/gh/Automattic/wp-calypso/92645#tests/containers/2

		test( 'should call apropriate action creators on success', async () => {

https://github.com/Automattic/wp-calypso/blob/7d249d9f48e69ec6accac349c48797de797a31d1/client/state/test/utils.js#L841 from Automattic/wp-calypso#24457


Docs:

asyncArrow is for async arrow function expressions
(e.g. async () => {}).

https://eslint.org/docs/rules/space-before-function-paren#options

> `asyncArrow` is for async arrow function expressions
> (e.g. `async () => {}`).

https://eslint.org/docs/rules/space-before-function-paren#options
Copy link
Contributor

@blowery blowery left a comment

Choose a reason for hiding this comment

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

LGTM

@blowery blowery merged commit 98f2965 into master Apr 25, 2018
@blowery blowery deleted the add/async-arrow-space-paren-always branch April 25, 2018 19:58
@aduth
Copy link
Contributor

aduth commented Apr 25, 2018

Similar style applied in Gutenberg: WordPress/gutenberg#5219

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants