Macil / flow-copy-source

Script to copy javascript files and append ".flow" to the filename
MIT License
173 stars 13 forks source link

Unexpected string #11

Closed Diokuz closed 6 years ago

Diokuz commented 6 years ago

Some of my react components are redirected for backward compatibility. But it breaks flow:

src/fields/InputSelect/InputSelect.js:

export default from '../../organisms/InputSelect/InputSelect'

Error:

node_modules/.bin/flow
Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ node_modules/***/lib/fields/InputSelect/InputSelect.js.flow:1:21

Unexpected string

     1│ export default from '../../organisms/InputSelect/InputSelect'
     2│

Is it a flow bug, or flow-copy-source?

Macil commented 6 years ago

That error doesn't ring any bells to me. Without more information, I'd have to assume it's a flow issue or an issue with how you've configured flow. Flow-copy-source does one job without much variation so I'd be surprised if it could be at fault here.

Diokuz commented 6 years ago

Looks like you cant just rename file to file.flow and expect it to be valid flow definition. But I expected that after I read your readme )

TrySound commented 6 years ago

@Diokuz Do you have // @flow in that file?