-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
fix(typescript-estree): error on unexpected jsdoc nodes #1525
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
Conversation
This comment has been minimized.
This comment has been minimized.
Codecov Report
@@ Coverage Diff @@
## master #1525 +/- ##
==========================================
+ Coverage 95.57% 95.57% +<.01%
==========================================
Files 149 149
Lines 6688 6691 +3
Branches 1915 1917 +2
==========================================
+ Hits 6392 6395 +3
Misses 112 112
Partials 184 184
|
Sorry for being late on this PR. In Prettier, we thought printing |
hmm, thats good point, main reason for this PR was fixing syntax i'm in conflict now, i don't want to produce that broken ast, but i want to support it at same time. i think we could support it, but we will have to prepare some tests (as to not crash because of it anymore) |
I'm asking specifically about The rest of the JSDoc types are of no interest. At least for now. We might meet them again though if one day Prettier decides to format JSDoc, but this is a completely different story. |
that's good idea, i will take a look, and prepare POC latter today, |
from my research it seems that only few jdoc nodes can actually appear in types.
additionally before this change syntax was crashing. (
|
Based on @thorn0's suggestion of "people who migrate from Flow to TS"
|
both syntaxes leading and trailing are generating currently same node (position is no preserved), i started writing rule for this, i will push this soon (and ofc i revert this commit and fixed issue) my only question is what node type we should use for them? maybe we should just keep those auto-generated names |
Yeah they can fall into the "unknown node bucket" which just prepends |
fixes #1301