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

feat(rome_js_formatter): Implement the decorator formatting #4608 #4627

Merged
merged 4 commits into from
Jun 30, 2023

Conversation

denbezrukov
Copy link
Contributor

@denbezrukov denbezrukov commented Jun 28, 2023

Summary

Fix #4608

class Class4 {
	method(
		@Decorator
		{ prop1_1, prop1_2 }: Type = {},
		{ prop2_1, prop2_2 }: Type
	) {
		doSomething();
	}
}

class Class {
	method(
		@aVeryLongDecoratorNameLetsSeeWhatHappensWithIt last,
		@d2(foo) y: number
	) {}
}

class Class2 {
	constructor(
		@param test,
		@aVeryLongDecoratorNameLetsSeeWhatHappensWithIt last,
		@d2(foo) y: number
	) {}

	method(
		@aVeryLongDecoratorNameLetsSeeWhatHappensWithIt last,
		@d2(foo) y: number
	) {}
}

class Class3 {
	constructor(
		private aaaaaaaaaaaaaaaaa: {
			aaaaaaaaaaaaa: number;
			bbbbbbbbbbb: string;
			cccccccccccc: Type;
		},
		@d1 private readonly x: number,
		@d2(foo) private y: number,
		@d3("foo") private z: number
	) {}
}

Test Plan

cargo test -p rome_js_formatter

@netlify
Copy link

netlify bot commented Jun 28, 2023

Deploy Preview for docs-rometools canceled.

Name Link
🔨 Latest commit eb02dc2
🔍 Latest deploy log https://app.netlify.com/sites/docs-rometools/deploys/649ea783da8e7f00083aa107

@github-actions github-actions bot added A-Formatter Area: formatter A-Parser Area: parser labels Jun 28, 2023
@github-actions
Copy link

Parser conformance results on ubuntu-latest

js/262

Test result main count This PR count Difference
Total 48863 48863 0
Passed 47810 47810 0
Failed 1053 1053 0
Panics 0 0 0
Coverage 97.84% 97.84% 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 6212 6212 0
Passed 1764 1764 0
Failed 4448 4448 0
Panics 0 0 0
Coverage 28.40% 28.40% 0.00%

ts/babel

Test result main count This PR count Difference
Total 639 639 0
Passed 573 573 0
Failed 66 66 0
Panics 0 0 0
Coverage 89.67% 89.67% 0.00%

ts/microsoft

Test result main count This PR count Difference
Total 17224 17224 0
Passed 13121 13121 0
Failed 4103 4103 0
Panics 0 0 0
Coverage 76.18% 76.18% 0.00%

@denbezrukov denbezrukov force-pushed the feat/parameter-decorator-formatting branch from 0909779 to 93f80fc Compare June 28, 2023 12:53
@github-actions github-actions bot added the A-Core Area: core label Jun 28, 2023
@denbezrukov denbezrukov force-pushed the feat/parameter-decorator-formatting branch from a7a402c to eb02dc2 Compare June 30, 2023 09:59
Copy link
Contributor

@ematipico ematipico left a comment

Choose a reason for hiding this comment

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

Many users will be happy about this!

@ematipico ematipico merged commit 7a901df into main Jun 30, 2023
18 checks passed
@ematipico ematipico deleted the feat/parameter-decorator-formatting branch June 30, 2023 13:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Core Area: core A-Formatter Area: formatter A-Parser Area: parser
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement the decorator formatting
2 participants