Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

feat(rome_js_formatter): class property members as assignment like #2797

Merged
merged 3 commits into from
Jun 30, 2022

Conversation

ematipico
Copy link
Contributor

@ematipico ematipico commented Jun 29, 2022

Summary

This adds TsPropertySignatureClassMember and JsPropertyClassMember to be formatted as "assignment like"

This PR implements #2424

The next fix on the table would be to finish up certain conditions to trigger the correct layout, but with this PR, we completed the number of nodes that require this type of formatting.

Test Plan

Made sure that the updated snapshots are correct

PR
File Based Average Prettier Similarity: 77.22%
Line Based Average Prettier Similarity: 72.43%

main
File Based Average Prettier Similarity: 77.16%
Line Based Average Prettier Similarity: 72.41%

@ematipico ematipico requested review from leops and yassere June 29, 2022 15:09
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jun 29, 2022

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: c26e658
Status: ✅  Deploy successful!
Preview URL: https://878bdfd7.tools-8rn.pages.dev
Branch Preview URL: https://feature-assignments-for-clas.tools-8rn.pages.dev

View logs

@ematipico ematipico temporarily deployed to aws June 29, 2022 15:34 Inactive
@github-actions
Copy link

@IWANABETHATGUY
Copy link
Contributor

!bench_formatter

@github-actions
Copy link

Formatter Benchmark Results

group                                    main                                   pr
-----                                    ----                                   --
formatter/checker.ts                     1.00    353.6±3.71ms     7.4 MB/sec    1.03    363.2±3.02ms     7.2 MB/sec
formatter/compiler.js                    1.02    223.7±1.38ms     4.7 MB/sec    1.00    218.6±1.21ms     4.8 MB/sec
formatter/d3.min.js                      1.02    191.4±1.07ms  1402.5 KB/sec    1.00    188.5±1.07ms  1424.2 KB/sec
formatter/dojo.js                        1.15     13.2±0.07ms     5.2 MB/sec    1.00     11.4±0.05ms     6.0 MB/sec
formatter/ios.d.ts                       1.11    264.2±1.56ms     7.1 MB/sec    1.00    238.6±1.24ms     7.8 MB/sec
formatter/jquery.min.js                  1.03     53.8±0.25ms  1573.9 KB/sec    1.00     52.4±0.34ms  1616.5 KB/sec
formatter/math.js                        1.02    369.1±1.68ms  1796.6 KB/sec    1.00    360.4±1.21ms  1839.7 KB/sec
formatter/parser.ts                      1.01      7.5±0.02ms     6.4 MB/sec    1.00      7.5±0.03ms     6.5 MB/sec
formatter/pixi.min.js                    1.02    207.4±1.06ms     2.1 MB/sec    1.00    202.6±0.88ms     2.2 MB/sec
formatter/react-dom.production.min.js    1.02     60.7±0.53ms  1940.6 KB/sec    1.00     59.3±0.45ms  1986.7 KB/sec
formatter/react.production.min.js        1.02      2.8±0.00ms     2.2 MB/sec    1.00      2.7±0.00ms     2.3 MB/sec
formatter/router.ts                      1.00      5.5±0.01ms    10.6 MB/sec    1.13      6.3±0.02ms     9.4 MB/sec
formatter/tex-chtml-full.js              1.02    478.9±2.24ms  1948.4 KB/sec    1.00    467.6±2.22ms  1995.7 KB/sec
formatter/three.min.js                   1.03    240.9±1.44ms     2.4 MB/sec    1.00    234.8±1.10ms     2.5 MB/sec
formatter/typescript.js                  1.00  1499.5±23.29ms     6.3 MB/sec    1.01  1508.8±11.94ms     6.3 MB/sec
formatter/vue.global.prod.js             1.08     83.6±4.43ms  1475.8 KB/sec    1.00     77.2±0.92ms  1598.4 KB/sec

@ematipico ematipico merged commit 9e22611 into main Jun 30, 2022
@ematipico ematipico deleted the feature/assignments-for-class-members branch June 30, 2022 07:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants