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(migrate): migrate nursery rules #2382

Merged
merged 5 commits into from May 14, 2024
Merged

feat(migrate): migrate nursery rules #2382

merged 5 commits into from May 14, 2024

Conversation

ematipico
Copy link
Member

@ematipico ematipico commented Apr 9, 2024

Summary

This PR adds a new analyzer to biome_migrate that automatically migrates nursery rules to stable groups.

Test Plan

Unfortunately, we don't have new nursery rules that were promoted, so I had to come up with a solution where we use a made-up list of rules for testing purposes.

This will change once we start migrating rules.

Copy link

netlify bot commented Apr 9, 2024

Deploy Preview for biomejs ready!

Name Link
🔨 Latest commit 501f706
🔍 Latest deploy log https://app.netlify.com/sites/biomejs/deploys/66154d77750e410008d58735
😎 Deploy Preview https://deploy-preview-2382--biomejs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 100 (🟢 up 13 from production)
Accessibility: 97 (no change from production)
Best Practices: 100 (no change from production)
SEO: 93 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@github-actions github-actions bot added L-JSON Language: JSON and super languages A-Core Area: core labels May 6, 2024
Copy link
Contributor

github-actions bot commented May 9, 2024

Parser conformance results on

js/262

Test result main count This PR count Difference
Total 49701 49701 0
Passed 48721 48721 0
Failed 980 980 0
Panics 0 0 0
Coverage 98.03% 98.03% 0.00%

jsx/babel

Test result main count This PR count Difference
Total 40 40 0
Passed 37 37 0
Failed 3 3 0
Panics 0 0 0
Coverage 92.50% 92.50% 0.00%

symbols/microsoft

Test result main count This PR count Difference
Total 6322 6322 0
Passed 2036 2036 0
Failed 4286 4286 0
Panics 0 0 0
Coverage 32.20% 32.20% 0.00%

ts/babel

Test result main count This PR count Difference
Total 662 662 0
Passed 593 593 0
Failed 69 69 0
Panics 0 0 0
Coverage 89.58% 89.58% 0.00%

ts/microsoft

Test result main count This PR count Difference
Total 17646 17646 0
Passed 13439 13439 0
Failed 4205 4205 0
Panics 2 2 0
Coverage 76.16% 76.16% 0.00%

@ematipico ematipico marked this pull request as ready for review May 9, 2024 09:48
@ematipico ematipico requested review from a team May 9, 2024 09:49
crates/biome_migrate/src/analyzers/nursery_rules.rs Outdated Show resolved Hide resolved
crates/biome_migrate/src/analyzers/nursery_rules.rs Outdated Show resolved Hide resolved
Comment on lines +28 to +30
nursery_rule_member: JsonMember,
/// The member of the group where the new rule should be moved
nursery_group: JsonMember,
Copy link
Member

Choose a reason for hiding this comment

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

I am a bit worried about the fact that we have tightened the implementation to JSON config. For the time being it is ok and I don't see how we could solve it anyway.

Copy link
Member Author

Choose a reason for hiding this comment

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

I really don't understand what you mean 😅

Copy link
Member

Choose a reason for hiding this comment

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

I mean we operate over JSON nodes, if one day we also handle YAML or TOML configurations, we will need to write a rule for every format.

crates/biome_migrate/src/analyzers/nursery_rules.rs Outdated Show resolved Hide resolved
crates/biome_migrate/src/analyzers/nursery_rules.rs Outdated Show resolved Hide resolved
@ematipico ematipico requested a review from Conaclos May 13, 2024 14:54
ematipico and others added 2 commits May 14, 2024 07:57
Co-authored-by: Victorien Elvinger <victorien@elvinger.fr>
@ematipico ematipico merged commit 99d5f63 into main May 14, 2024
15 checks passed
@ematipico ematipico deleted the feat/migrate-rules branch May 14, 2024 07:34
Copy link

codspeed-hq bot commented May 14, 2024

CodSpeed Performance Report

Merging #2382 will not alter performance

Comparing feat/migrate-rules (50e019a) with main (eb42e97)

Summary

✅ 97 untouched benchmarks

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

Successfully merging this pull request may close these issues.

None yet

2 participants