Skip to content
This repository has been archived by the owner on May 19, 2018. It is now read-only.

Fix arrow param locations with flow types #57

Merged
merged 1 commit into from
Aug 16, 2016
Merged

Fix arrow param locations with flow types #57

merged 1 commit into from
Aug 16, 2016

Conversation

danez
Copy link
Member

@danez danez commented Jun 26, 2016

This patch corrects the end locations for params in arrow functions
which use type params.

I was assuming that the way it is in function declarations is the correct way (location of identifier includes typeAnnotation), but I might be wrong, as here the opposite is expected it seems: gajus/eslint-plugin-flowtype#8
But I also looked at other constructs like ObjectTypeProperties, or FunctionDeclaration, which all include the type in their location. So from my point of view it seems to be the correct way.

No new tests added, as there were enough tests that already covered this case.

Fixes #51

This patch corrects the end locations for params in arrow functions
which use type params.
@codecov-io
Copy link

codecov-io commented Jul 28, 2016

Current coverage is 96.92% (diff: 100%)

Merging #57 into master will increase coverage by <.01%

@@             master        #57   diff @@
==========================================
  Files            19         19          
  Lines          2922       2923     +1   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits           2832       2833     +1   
  Misses           90         90          
  Partials          0          0          

Powered by Codecov. Last update f576865...9cf395a

@sebmck sebmck merged commit 43cdd2f into babel:master Aug 16, 2016
@danez danez deleted the fix-arrow-location branch August 18, 2016 20:58
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.

None yet

3 participants