Skip to content

Conversation

o-m12a
Copy link
Contributor

@o-m12a o-m12a commented Apr 29, 2025

closes: #10603

Description

Just added missing test cases for the reserved words yield and let.

These words are mentioned in #10603 (comment).
These words would be contextual keywords that can be used as identifiers in certain contexts.

Adding missing test cases are required in #10603 (comment).

Note

In o-m12a@1980a53, I also unified to use var in test snippets.

This was done because, using const or let instead of var like the following in let.js

const let = "foo"; // using `const` instead of `var`
let let = "foo"; // using `let` instead of `var`

causes the TypeScript error 'let' is not allowed to be used as a name in 'let' or 'const' declarations. ts(2480).

I'd like to avoid this compile error by using var.

Checklist

Try the playground for this PR

Copy link

netlify bot commented Apr 29, 2025

Deploy Preview for prettier ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 1980a53
🔍 Latest deploy log https://app.netlify.com/sites/prettier/deploys/6810879631afc80008c97416
😎 Deploy Preview https://deploy-preview-17416--prettier.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@o-m12a o-m12a marked this pull request as ready for review April 29, 2025 08:13
Copy link

pkg-pr-new bot commented Apr 29, 2025

Open in StackBlitz

npm i https://pkg.pr.new/prettier@17416

commit: 1980a53

@fisker
Copy link
Member

fisker commented Apr 29, 2025

Thank you!

@fisker fisker merged commit d4684bf into prettier:main Apr 29, 2025
28 of 31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Re-enable error recovery for contextual keywords used as identifiers
2 participants