Skip to content
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

fix: noUndeclaredVariables no longer errors on this in JSX tags #2647

Merged
merged 1 commit into from
Apr 29, 2024

Conversation

printfn
Copy link
Contributor

@printfn printfn commented Apr 29, 2024

Summary

I've tried to write a fix for #2636. I'm not really sure if my code is correct but it seems to pass the tests.

Test Plan

I've added a regression test.

@github-actions github-actions bot added A-Linter Area: linter A-Parser Area: parser L-JavaScript Language: JavaScript and super languages A-Changelog Area: changelog labels Apr 29, 2024
Copy link
Member

@Conaclos Conaclos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good fix! Thanks!

Copy link

codspeed-hq bot commented Apr 29, 2024

CodSpeed Performance Report

Merging #2647 will not alter performance

Comparing printfn:fix-this-in-jsx (797c3f7) with main (46c378e)

Summary

✅ 90 untouched benchmarks

@Conaclos Conaclos merged commit a85016a into biomejs:main Apr 29, 2024
13 checks passed
@printfn printfn deleted the fix-this-in-jsx branch April 29, 2024 20:01
@printfn
Copy link
Contributor Author

printfn commented Apr 29, 2024

I noticed this seems to be producing a bogus node for this in JSX. I’ll see if I can fix it later today.

@Conaclos
Copy link
Member

I noticed this seems to be producing a bogus node for this in JSX. I’ll see if I can fix it later today.

I've checked the grammar. Indeed, a ThisExpression cannot be used as a JSX name.
This will require some time to think about it.
I will revert this PR for the upcoming patch release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Changelog Area: changelog A-Linter Area: linter A-Parser Area: parser L-JavaScript Language: JavaScript and super languages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants