facebook / facebook/flow

nonstrict-import applies on packages in node_modules

Open
#6,628 8 comments 9 reactions 0 assignees View on GitHub
linter
Dominant language
Rust
Stars
22.3k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

I'm not sure if it's a bug or a feature.

When I enable Flow Strict with `nonstrict-import` lint, then I can't import from libraries that export Flow files, but they are not strict.

For example the Facebook's IDX:

```
Dependencies of a @flow strict module must also be @flow strict! (nonstrict-import)

1│ // @flow strict
2│
3│ import idx from 'idx';
4│
```

But I can still import any module that has a flow-typed library definition. Isn't that strange? Libraries that are not even shipped with types are considered strict, libraries with types are non-strict.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.