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
Re-enable error recovery for contextual keywords used as identifiers #10603
Comments
var let = 3 Should not be error too. |
Turns out Prettier simply shouldn't rethrow |
@thorn0 I would like to contribute to this if possible, I am a first time contributor here. Any directions on this would be awesome |
@meehawk Sorry, but I'm afraid this has been fixed by #10802. Prettier 2.3.0 --parser babel Input: yield = 3
var let = 3 Output: yield = 3;
var let = 3; |
On the other hand, tests for this weren't added, so let's reopen the issue. @meehawk Would you like to contribute tests? |
@thorn0 sure that sounds like an amazing place to start though I am not that experienced when it comes to testing. Do you have any pointers on how could I get started? |
Can I start the tests for this fix? @thorn0 |
causes an error:
Unexpected reserved word 'yield'
(playground), which should only happen in modules. In non-module code,yield
is an acceptable identifier (spec). Prettier 2.2.1 handles this better thanks to the error recovery (playground).Originally posted by @thorn0 in #10446 (comment)
The text was updated successfully, but these errors were encountered: