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(grit): add more formatting nodes #4515

Merged
merged 1 commit into from
Nov 12, 2024
Merged

Conversation

ematipico
Copy link
Member

Summary

This PR adds many more formatting for many more nodes for the grit language. I also fixed some existing issues around how lists were formatted.

FYI, I used TrailingSeparator::Omit for all lists, which removes the last trailing separator in case it's present. We can revisit the logic later on.

I removed the node GritPatternArgList because it wasn't needed. I updated the code accordingly.

Inside GritBubble, I renamed variables in scope; considering that the relative node is called GritBubbleScope, it felt adequate.

Test Plan

Added new tests and updated the existing ones.

@ematipico ematipico requested review from arendjr and a team November 12, 2024 13:51
@github-actions github-actions bot added A-Parser Area: parser A-Formatter Area: formatter A-Tooling Area: internal tools L-Grit Language: GritQL labels Nov 12, 2024
Copy link
Contributor

Parser conformance results on

js/262

Test result main count This PR count Difference
Total 48591 48591 0
Passed 47399 47399 0
Failed 1192 1192 0
Panics 0 0 0
Coverage 97.55% 97.55% 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 6586 6586 0
Passed 2208 2208 0
Failed 4378 4378 0
Panics 0 0 0
Coverage 33.53% 33.53% 0.00%

ts/babel

Test result main count This PR count Difference
Total 680 680 0
Passed 608 608 0
Failed 72 72 0
Panics 0 0 0
Coverage 89.41% 89.41% 0.00%

ts/microsoft

Test result main count This PR count Difference
Total 18615 18615 0
Passed 14270 14270 0
Failed 4345 4345 0
Panics 0 0 0
Coverage 76.66% 76.66% 0.00%

Copy link

codspeed-hq bot commented Nov 12, 2024

CodSpeed Performance Report

Merging #4515 will improve performances by 7.42%

Comparing feat/grit-formatting-part-2 (3fafbc4) with main (0c89612)

Summary

⚡ 1 improvements
✅ 98 untouched benchmarks

Benchmarks breakdown

Benchmark main feat/grit-formatting-part-2 Change
react.production.min_3378072959512366797.js[cached] 2 ms 1.8 ms +7.42%

@ematipico ematipico merged commit 929e86d into main Nov 12, 2024
13 checks passed
@ematipico ematipico deleted the feat/grit-formatting-part-2 branch November 12, 2024 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Formatter Area: formatter A-Parser Area: parser A-Tooling Area: internal tools L-Grit Language: GritQL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants