-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Add variable declarator validation changelog #3075
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
✅ Deploy Preview for babel-next ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for babel ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
|
|
||
| __Migration__: Call `t.identifier` with a valid name. | ||
|
|
||
| - Reject invalid variable declarator in `t.variableDeclaration` builder ([#10917](https://github.com/babel/babel/pull/10917), [#17217](https://github.com/babel/babel/pull/17217)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#10917 was copied accidentally?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope. It is intentional. This feature was first introduced in #10917: https://github.com/babel/babel/pull/10917/files#diff-64d1d669cf9d0cd3344a526b186c9f7496ac14237a47573926ea505c4bcc8df3R1024
| // highlight-error-next-line | ||
| t.variableDeclaration("var", [ | ||
| t.variableDeclarator(t.arrayPattern([t.identifier("x")])) | ||
| ]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe highlight these three lines?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently we don't have highlight-error block. I will see if I can add it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can also copy the comment three times. :)
Docs PR for babel/babel#17217