Some problems with pragmas
- 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?
1. When warnings are enabled via the options, `@flow-runtime assert` does nothing; `shouldWarn` still is true in the `ConversionContext`, and only warnings are emitted.
2. The `@flow-runtime` annotation is not recognized when it is followed by a `"use strict"` directive, because babel attaches the comment to the directive; e.g.
```
// @flow-runtime assert
"use strict";
console.log((1: string));
```
does not assert.
---
### What is the expected behaviour?
1. The pragma should override the options completely.
2. The pragma should still work even in the presence of a strictness directive.
---
### Which package versions are you using?
0.11.1, also reproducible on https://codemix.github.io/flow-runtime/#/try
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.