facebook / facebook/flow

Add a JS generated by babel having Flow Comment to Libs

Open
#3,372 0 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
Rust
Stars
22.3k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

Hi guys

I have two projects.

1. Core Component
- I use https://www.npmjs.com/package/babel-plugin-flow-comments to generate https://flowtype.org/blog/2015/02/20/Flow-Comments.html
- The output will be ES5 having Flow-Comments

2. Product Project
- Use Core Component as a node_modules dependencies
- flowconfig
```
[libs]
./node_modules/core-react/output/

[ignore]
./node_modules/core-react/output/.*
```

I got an issues, Flow does not ignore this folder and because Babel Transform the Core Component file is not a valid flow file.

```
Property not found in. See lib: ../../components/output/Button.js:130
130: var classes = (0, _classnames4.default)(className, 'ace-button', (0, _defineProperty3.default)({}, 'ace-button-' + variant.variant, contains(variant.variant, variants)), (0, _defineProperty3.default)({}, 'ace-button-' + size, contains(size, sizes)), { 'ace-button-collapsible': collapsible });
^^^^^^^ String. See lib: ../../components/output/Button.js:130
```

How can I ignore this checking ?

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.