facebook / facebook/flow

Flow's linter complains that JSON files are untyped

Open
#5,749 6 comments 17 reactions 0 assignees View on GitHub
bug
Dominant language
Rust
Stars
22.3k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

Flow's linter is telling me to add `// @flow` to a JSON file 😬

```
Warning: app/server/helpers/environment.js:2
2: import { version } from '../../../package.json';
^^^^^^^ untyped-import: Importing from an untyped module makes it `any` and is not safe! Did you mean to add `// @flow` to the top of `../../../package.json`?
```

Is this a bug? I would imagine all JSON files are 100% inferable and therefore could be treated as typed.

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.