interactivethings / eslint-config-interactivethings

The Interactive Things ESLint config
BSD 3-Clause "New" or "Revised" License
3 stars 0 forks source link

Problem with Flow type annotations #2

Closed jstcki closed 9 years ago

jstcki commented 9 years ago

Mostly lints fine with Flow annotations, but for some reason this doesn't:

/* @flow */

export default class Foo {
  bar(): object {
    return {};
  }
}

ESLint complains:

error  "object" used outside of binding context  block-scoped-var
error  "object" is not defined                   no-undef

Other types (e.g. string) lint fine.

jstcki commented 9 years ago

Stupid me! object isn't even a flow type. Should use Object or better something like {foo: string}.