This repository has been archived by the owner. It is now read-only.

Fix arrow param locations with flow types #57

Merged
merged 1 commit into from Aug 16, 2016

Conversation

Projects
None yet
3 participants
@danez
Copy link
Member

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

@danez danez added i: bug Tag: Bug Fix and removed i: bug labels Jun 29, 2016

@danez danez force-pushed the danez:fix-arrow-location branch 3 times, most recently from 4d7fcca to 976f2a5 Jun 29, 2016

Fix arrow param locations with flow types
This patch corrects the end locations for params in arrow functions
which use type params.

@danez danez force-pushed the danez:fix-arrow-location branch from 976f2a5 to cd987cd Jul 28, 2016

@codecov-io

This comment has been minimized.

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

@kittens kittens merged commit 43cdd2f into babel:master Aug 16, 2016

3 checks passed

codecov/patch 100% of diff hit (target 96.91%)
Details
codecov/project 96.92% (+<.01%) compared to f576865
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@hzoo hzoo referenced this pull request Aug 16, 2016

Merged

Update CHANGELOG.md for 6.9.0 #91

@danharper danharper referenced this pull request Aug 16, 2016

Merged

Fix tests #68

@danez danez deleted the danez:fix-arrow-location branch Aug 18, 2016

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