New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
--insert-pragma causing weird commenting issue due to single asterisk comment #3269
Comments
Looks to be an issue with jest-docblock not realizing it's a malformed doc-block, I'll work on a fix for that. |
This is definitely a bug. Not sure what the expected output is though. |
@lydell, it's a bug, but the bug is really in jest-docblock, it's desired behavior could be a few things, I think option 1 is the most sensible with the least caveats. |
Single line comments do even weirder things... ** Input ** /* ShippingValidation:
*/ ** Output ** /**undefined * /* ShippingValidation:undefined *undefined * @formatundefined */ ** Input ** /* ShippingValidation: */ ** Output ** /**undefined * /* ShippingValidation:undefined *undefined * @formatundefined */ |
I think it's all just a minor parsing issue in jest-docblock, I'll look into it later |
It's also problematic with eslint and flow. For example, eslint no-undef reports errors after prettier --insert-pragma changes
to
Making the global declaration unrecognizable to eslint. The |
Fixed by #13054 |
Prettier 1.8.2
Playground link
Input:
Output:
Expected behavior:
or
or
I'd be fine if it added the proper Doc Block asterisk or if it just kept it a single, either way is fine.
I can TRY to get around to creating a PR for this, but I'm not sure I have the time today.
The text was updated successfully, but these errors were encountered: