gulp-flowtype icon indicating copy to clipboard operation
gulp-flowtype copied to clipboard

Babel enabled code: Flow has found 0 errors

Open screendriver opened this issue 11 years ago • 14 comments

Hi,

I am writting my JavaScript code with the help of Babel. If I run flow from the command line it finds my errors. If I run gulp-flowtype within a Gulp task it founds nothing.

mytest.js

/* @flow */
class Person {}

class Dog {}

function foo(args: Person) {}

foo(new Dog());

gulpfile.babel.js

import gulp from 'gulp';
import flow from 'gulp-flowtype';

gulp.task('flow', () => {
  return gulp.src('mytest.js')
    .pipe(flow());
});

flow output:

/Users/me/test/mytest.js:8:1,14: function call
Error:
/Users/me/test/mytest.js:8:9,11: Dog
This type is incompatible with
/Users/me/test/mytest.js:6:20,25: Person

gulp-flowtype output:

❯ gulp flow
[15:10:24] Requiring external module babel-core/register
[15:10:26] Requiring external module babel-core/register
[15:10:27] Using gulpfile ~/test/gulpfile.babel.js
[15:10:27] Starting 'flow'...
[15:10:27] gulp-debug: 0 items
✔ Flow has found 0 errors
[15:10:27] Finished 'flow' after 9.53 ms

screendriver avatar Aug 12 '15 13:08 screendriver

Hi,

Will look into this asap.

Cheers, Charlie

charliedowler avatar Aug 23 '15 22:08 charliedowler

@charliedowler any update on this please, need any help with that?

gdaybrice avatar Sep 26 '15 07:09 gdaybrice

+1

Been strugglin' w/ this myself for the past 2 days...

RavenHursT avatar Oct 16 '15 22:10 RavenHursT

+1 same issue here.

neciu avatar Nov 25 '15 15:11 neciu

+1

In my case flowtype is ran after babel has cleared flowtype formatting. It would be awesome if example with browserify & babel6 would be added.

mxrguspxrt avatar Dec 05 '15 17:12 mxrguspxrt

Hi,

Really sorry this project has been neglected, I've been super busy but am aiming to bring it up to date in the Christmas break.

Cheers, Charlie

charliedowler avatar Dec 05 '15 21:12 charliedowler

+1

cupsadarius avatar Dec 09 '15 09:12 cupsadarius

+1 :(

BlueHotDog avatar May 31 '16 09:05 BlueHotDog

+1 :-(

acarl avatar Jun 20 '16 15:06 acarl

+1

vojtatranta avatar Jul 03 '16 18:07 vojtatranta

Shame that you don't have time for this - I tried to examine it and in the json report the "path" key is simply empty and no files are therefore matched. Do you use some kind of different version of flow or something? Thanks.

vojtatranta avatar Jul 03 '16 19:07 vojtatranta

Hi,

I have a local branch for a potential fix, the flow JSON output changed.

I'll try and get it out

Cheers

charliedowler avatar Jul 03 '16 20:07 charliedowler

@charliedowler thank you for your time! Flow output change? Like with a different version of Flow or by using Babel? Could you push that local branch so I could take a look and help you, if you wish...

vojtatranta avatar Jul 04 '16 09:07 vojtatranta

https://github.com/charliedowler/gulp-flowtype/pull/42#issuecomment-237059000

charliedowler avatar Aug 02 '16 22:08 charliedowler