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

refactor(biome_analyze): derive Applicability from FixKind #2885

Conversation

dyc3
Copy link
Contributor

@dyc3 dyc3 commented May 16, 2024

Summary

FixKind and Applicability line up one to one, and need to remain in sync. This adds RuleMetadata::to_applicability() and a impl From<FixKind> for Applicability.

I'll follow up this PR with another codemod to change all the rules to call this function instead.

Related to: #2799

Test Plan

It compiles.

@github-actions github-actions bot added A-Linter Area: linter L-JavaScript Language: JavaScript and super languages labels May 16, 2024
@dyc3 dyc3 marked this pull request as ready for review May 16, 2024 12:47
Copy link

codspeed-hq bot commented May 16, 2024

CodSpeed Performance Report

Merging #2885 will not alter performance

Comparing dyc3:05-16-refactor_biome_analyze_derive_applicability_from_fixkind_ (bb416a4) with main (eaca8a3)

Summary

✅ 99 untouched benchmarks

@dyc3 dyc3 force-pushed the 05-16-refactor_biome_analyze_derive_applicability_from_fixkind_ branch from 06cadd2 to bb416a4 Compare May 16, 2024 13:29
@dyc3 dyc3 requested a review from ematipico May 16, 2024 13:30
@Conaclos Conaclos merged commit d215034 into biomejs:main May 16, 2024
10 of 12 checks passed
@dyc3 dyc3 deleted the 05-16-refactor_biome_analyze_derive_applicability_from_fixkind_ branch May 16, 2024 14:35
@Conaclos
Copy link
Member

Conaclos commented May 16, 2024

@dyc3
Copy link
Contributor Author

dyc3 commented May 16, 2024

Taking a look now.

@dyc3
Copy link
Contributor Author

dyc3 commented May 16, 2024

Submitted a fix in #2890.

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

Successfully merging this pull request may close these issues.

3 participants