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

feat(rome_js_formatter): Format Arrow Chains #3122

Merged
merged 6 commits into from
Aug 30, 2022
Merged

Conversation

MichaReiser
Copy link
Contributor

@MichaReiser MichaReiser commented Aug 29, 2022

This PR adds support for formatting arrow expression chains

const x =
    (a): string =>
    (b) =>
    (c) =>
    (d) =>
    (e) =>
        f;

Based on the IndentIfBreak IR Element #3116

Test Plan

Added new snapshot tests for arrow chains

Average compatibility: 84.74 -> 84.94
Compatible lines: 82.81-> 83.08

@cloudflare-workers-and-pages
Copy link

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

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 6499e2c
Status: ✅  Deploy successful!
Preview URL: https://cf78502b.tools-8rn.pages.dev
Branch Preview URL: https://feat-arrow-chain.tools-8rn.pages.dev

View logs

@IWANABETHATGUY
Copy link
Contributor

Would you mind updating prettier compatibility

@MichaReiser MichaReiser mentioned this pull request Aug 29, 2022
17 tasks
@MichaReiser
Copy link
Contributor Author

Would you mind updating prettier compatibility

I'll do so once the dependent PR's are merged

Base automatically changed from feat/parentheses-transform to main August 29, 2022 15:13
@MichaReiser MichaReiser requested a review from a team August 29, 2022 15:13
@MichaReiser MichaReiser temporarily deployed to aws August 29, 2022 15:14 Inactive
@github-actions
Copy link

github-actions bot commented Aug 29, 2022

@MichaReiser MichaReiser temporarily deployed to aws August 29, 2022 15:23 Inactive
@MichaReiser MichaReiser temporarily deployed to aws August 29, 2022 15:34 Inactive
@MichaReiser MichaReiser temporarily deployed to aws August 30, 2022 09:28 Inactive
crates/rome_formatter/src/builders.rs Outdated Show resolved Hide resolved
crates/rome_formatter/src/builders.rs Outdated Show resolved Hide resolved
Micha Reiser and others added 4 commits August 30, 2022 12:14
This PR adds support for formatting arrow expression chains

```
const x =
	(a): string =>
	(b) =>
	(c) =>
	(d) =>
	(e) =>
		f;
```
@MichaReiser MichaReiser temporarily deployed to aws August 30, 2022 10:15 Inactive
crates/rome_formatter/src/builders.rs Outdated Show resolved Hide resolved
crates/rome_formatter/src/builders.rs Outdated Show resolved Hide resolved
@MichaReiser MichaReiser temporarily deployed to aws August 30, 2022 11:34 Inactive
@MichaReiser MichaReiser temporarily deployed to aws August 30, 2022 11:34 Inactive
@MichaReiser MichaReiser merged commit d107297 into main Aug 30, 2022
@MichaReiser MichaReiser deleted the feat/arrow-chain branch August 30, 2022 11:48
ematipico added a commit that referenced this pull request Sep 5, 2022
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