Skip to content
This repository has been archived by the owner on Aug 18, 2021. It is now read-only.

Flow interface incorrectly determined to be undefined #279

Closed
arv opened this issue Mar 22, 2016 · 3 comments
Closed

Flow interface incorrectly determined to be undefined #279

arv opened this issue Mar 22, 2016 · 3 comments

Comments

@arv
Copy link

arv commented Mar 22, 2016

Similar to #66 but for interfaces.

// @flow
interface Foo {
  m(): number;
}

export function f(foo: Foo): Foo {
  return foo;
}
$ npm ls babel-eslint
└── babel-eslint@5.0.0
$ node_modules/.bin/eslint foo.js

.../foo.js
  2:11  error  "Foo" is not defined  no-undef
  6:24  error  "Foo" is not defined  no-undef
  6:30  error  "Foo" is not defined  no-undef

✖ 3 problems (3 errors, 0 warnings)
@mechanoid
Copy link

Is there any news on that?

@trevorr
Copy link

trevorr commented Apr 21, 2016

Until this is fixed, this workaround is available: https://github.com/zertosh/eslint-plugin-flow-vars

@hzoo
Copy link
Member

hzoo commented Apr 26, 2016

https://github.com/babel/babel-eslint#known-issues - This isn't really something we can fix because there are conflicts between no-undef and no-unused-vars. We recommend ^ like in the readme

@hzoo hzoo closed this as completed Apr 26, 2016
@hzoo hzoo added the can't fix label Apr 26, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants