Skip to content
This repository has been archived by the owner on May 24, 2019. It is now read-only.

Remove pragma comment completely if no other content present #59

Open
StreetStrider opened this issue Dec 21, 2017 · 3 comments
Open

Remove pragma comment completely if no other content present #59

StreetStrider opened this issue Dec 21, 2017 · 3 comments

Comments

@StreetStrider
Copy link

Is it possible to supply an option to remove pragmas with corresponding comments completely, if comments have no other content but pragma only? Like:
/* @flow foo *//* foo */,
but /* @flow */ → (empty string).

For now I got emptish comments in my generated code like this: /* */.

@dashed
Copy link

dashed commented May 13, 2018

Also // @flow gets transformed to just //. Be useful to just remove this completely.

@motiz88
Copy link
Contributor

motiz88 commented Feb 15, 2019

Hey @StreetStrider @dashed, apologies for the long radio silence. I wonder: What's the impact of this issue? Does anything actually not work because we leave these empty comments in the output? I mean, I can see a case for this in --pretty mode, but still, it seems fairly benign to me.

@StreetStrider
Copy link
Author

@motiz88 nothing broken, it's just a matter of style. If the only reason I create comment is to put flow pragma in it, I would like this comment to be eleminated completely by something like flow pragma removing utility.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants