Skip to content

Conversation

@johnsonw
Copy link
Owner

@johnsonw johnsonw commented Apr 6, 2016

Check if there is a return type. If there is, determine the spaceAfter for the return type and verify space is set / not set, based on the defined spaceAfterTypeColon rule.

Given the following configuration:

"flowtype/space-after-type-colon": [
   1,
   "never"
]

and a function:
function fn (key: string): Object {

Running the linter will produce the following:
xxx:yy  warning  There must be no space after "key" parameter type annotation colon  flowtype/space-after-type-colon

This patch will address this issue and ensure that the return type is also taken into consideration when checking for spaces after the colon.
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