flow-copy-source icon indicating copy to clipboard operation
flow-copy-source copied to clipboard

option to rename `.jsx.flow` -> `.js.flow`

Open sodiumjoe opened this issue 6 years ago • 3 comments

babel does this, and when I just run flow-copy-source, flow doesn't appear to be able to find the correct files until I rename all the .jsx.flow files to .js.flow.

sodiumjoe avatar Mar 05 '19 00:03 sodiumjoe

in fact, i can't think of any reason why we'd want .jsx.flow files so maybe an option would be wrong, it should just always rename to .js.flow?

sodiumjoe avatar Mar 06 '19 01:03 sodiumjoe

This sounds like a good feature. I'm fine with making it the default behavior, though I'm going to consider it a breaking change and bump the major version number.

Should any other extensions be changed to .js? (Like .mjs?) I'd like the default to be consistent with whatever the babel CLI tool does.

Macil avatar Mar 06 '19 01:03 Macil

I'm not an .mjs user and I'm not sure what the story is for how people use .mjs. I expect for publishing libraries, people still rename to .js, though?

Always renaming to .js seems like a sane default. You could add a configuration option if people need it.

sodiumjoe avatar Mar 06 '19 17:03 sodiumjoe