import-js/eslint-plugin-import
View on GitHubfalse positive no-unused-modules with Flow
Open
#1,539 opened on Nov 13, 2019
bugflowhelp wanted
Repository metrics
- Stars
- (4,946 stars)
- PR merge metrics
- (Avg merge 138d 22h) (3 merged PRs in 30d)
Description
When type import goes before default import from the same file, the default export is marked as unused:
// foo.js
// @flow strict
export type Foo = string
export default ''
// index.js
// @flow strict
import type {Foo} from './foo'
import foo from './foo'
3:1 error exported declaration 'default' not used within other modules import/no-unused-modules
It works OK if I change the imports order:
// index.js
// @flow strict
import foo from './foo'
import type {Foo} from './foo'