Skip to content

fix: don't consider method calls on literals or new to be jest functions#1132

Merged
G-Rath merged 1 commit intomainfrom
fix-ref-checks
May 29, 2022
Merged

fix: don't consider method calls on literals or new to be jest functions#1132
G-Rath merged 1 commit intomainfrom
fix-ref-checks

Conversation

@G-Rath
Copy link
Copy Markdown
Collaborator

@G-Rath G-Rath commented May 29, 2022

I was trying to be a little clever, but there's a reason why getNodeName does this...

I've also included removing allowing NewExpression because that's also not correct.

Resolves #1128
Resolves #1130

@G-Rath G-Rath added the bug label May 29, 2022
@G-Rath
Copy link
Copy Markdown
Collaborator Author

G-Rath commented May 29, 2022

I've also just found we're matching on test.only``() - will fix that in another PR since it's a different thing

@G-Rath G-Rath merged commit 379ceb3 into main May 29, 2022
@G-Rath G-Rath deleted the fix-ref-checks branch May 29, 2022 19:33
github-actions bot pushed a commit that referenced this pull request May 29, 2022
## [26.4.3](v26.4.2...v26.4.3) (2022-05-29)

### Bug Fixes

* don't consider method calls on literals or `new` to be jest functions ([#1132](#1132)) ([379ceb3](379ceb3))
* produce valid code when when fixing properties accessed with square brackets ([#1131](#1131)) ([6cd600d](6cd600d))
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 26.4.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

false positive lint error introduced between 26.1.5 and 26.4.2 v26.4.2 is treating any file including /regex/.test(arg) as a test file

1 participant