gajus / gajus/flow-runtime

babel plugin adds annotations even when no @flow pragma is present

Open
#89 2 comments 2 reactions 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
797
Forks
49
PR merge metrics
No merged PRs in 30d

Description

This is a:

- [x] Bug Report

Which concerns:

- [x] babel-plugin-flow-runtime

---

### What is the current behaviour?

Currently, a file that contains type annotations, but no `@flow` pragma, will still get the `flow-runtime` annotations. This is a problem, especially since you cannot write `@flow-runtime ignore`, without enabling flow itself at the same time 🤓

(Flow looks for `@flow`, not `^@flow$`, and `@flow-runtime` satisfies the regex).

---

### What is the expected behaviour?

The babel plugin should not annotate files without the `@flow` pragma.

---

### Which package versions are you using?

0.10.0

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.