Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue11 #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Issue11 #1

wants to merge 1 commit into from

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.

1 participant