-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Description
"Identifier syntax":
// @flow
import { type Dispatch } from 'redux';Gives following error:
2:15 error Dispatch not found in 'redux' import/named
Whilst the "declaration syntax":
// @flow
import type { Dispatch } from 'redux';Generates no error.
This is especially annoying for users that use the flowtype/type-import-style rule with the default setting ("identifier") and run ESLint with --fix, since that rule will automatically change the syntax, which then triggers import/named.
The point of the identifier syntax is to combine type and value imports in the same statement, e.g.
// @flow
import { configureStore, type Dispatch } from 'redux';The docs for this rule state:
Note that type imports, as used by Flow, are always ignored.
So I think this is a bug. Can we ignore the identifier syntax for this rule also?
rostislav-simonik