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

feat(linter): support useGuardForIn #4104

Merged
merged 1 commit into from
Oct 10, 2024
Merged

Conversation

fireairforce
Copy link
Contributor

Summary

closes: #3933

Test Plan

@github-actions github-actions bot added A-Project Area: project A-Linter Area: linter L-JavaScript Language: JavaScript and super languages A-Diagnostic Area: diagnostocis A-Changelog Area: changelog A-CLI Area: CLI labels Sep 27, 2024
Copy link

codspeed-hq bot commented Sep 27, 2024

CodSpeed Performance Report

Merging #4104 will not alter performance

Comparing fireairforce:feat-3933 (3dc2528) with main (2e5b656)

Summary

✅ 105 untouched benchmarks

Copy link
Member

@ematipico ematipico left a comment

Choose a reason for hiding this comment

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

The rule must be called useGuardForIn

@fireairforce fireairforce changed the title feat(linter): support guardForIn feat(linter): support useGuardForIn Sep 27, 2024
@fireairforce
Copy link
Contributor Author

sorry i miss the rule name convention for biome, i update the lint name now, please review again when you free~ @ematipico

Copy link
Member

@ematipico ematipico left a comment

Choose a reason for hiding this comment

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

The code might be good, but unfortunately the documentation is nearly absent, and the diagnostics should provide more information to the user.

Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't we add cases where we have a for..in loop with Object.hasOwn(foo, key), for example?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated~ thanks for review

@github-actions github-actions bot added A-Project Area: project and removed A-Project Area: project labels Oct 9, 2024
@fireairforce
Copy link
Contributor Author

i solve the conflict at my local, maybe the mr can be merged later?

@Conaclos Conaclos merged commit 970f498 into biomejs:main Oct 10, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Changelog Area: changelog A-CLI Area: CLI A-Diagnostic Area: diagnostocis A-Linter Area: linter A-Project Area: project L-JavaScript Language: JavaScript and super languages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

📎 Implement useForInGuard - eslint/guard-for-in
3 participants