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(tsutils): identify only valid global properties #343

Merged
merged 1 commit into from Jul 23, 2019
Merged

fix(tsutils): identify only valid global properties #343

merged 1 commit into from Jul 23, 2019

Conversation

ranyitz
Copy link
Contributor

@ranyitz ranyitz commented Jul 23, 2019

This PR fixes #340 for TypeScript as well after implementing it on #341.

The types has reminded me that I've needed to verify that the property is an identifier before accessing its name, so I've changed it as well in the js util.

@@ -96,6 +96,19 @@ export enum HookName {
'afterEach' = 'afterEach',
}

export enum DescribeProperty {
Copy link
Member

Choose a reason for hiding this comment

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

no need to export them, but meh

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I've just tried to be consistent with all of the rest, but you are right, it is not necessary at the moment.

Copy link
Member

@SimenB SimenB left a comment

Choose a reason for hiding this comment

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

thanks!

@SimenB SimenB merged commit ae3e599 into jest-community:master Jul 23, 2019
@SimenB
Copy link
Member

SimenB commented Jul 23, 2019

🎉 This PR is included in version 22.13.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

@ranyitz ranyitz deleted the validate-property-names-ts branch July 23, 2019 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

False positives for no-identical-title rule
2 participants