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

🐛 Don't break signature of hugged function expression if parameters are identifiers without types #851

Closed
1 task done
Conaclos opened this issue Nov 23, 2023 · 4 comments
Assignees
Labels
A-Formatter Area: formatter L-JavaScript Language: JavaScript and super languages S-Bug-confirmed Status: report has been confirmed as a valid bug S-Help-wanted Status: you're familiar with the code base and want to help the project

Comments

@Conaclos
Copy link
Member

Environment information

Playground

What happened?

Playground link

Prettier issue: prettier#13410

Expected result

The following code:

export const Link = forwardRef<HTMLAnchorElement, LinkProps>(function Link(props, ref) {
  return <ThemeUILink ref={ref} variant="default" {...props} />;
});

should be formatted as Prettier:

export const Link = forwardRef<HTMLAnchorElement, LinkProps>(
	function Link(props, ref) {
		return <ThemeUILink ref={ref} variant="default" {...props} />;
	}
);

Code of Conduct

  • I agree to follow Biome's Code of Conduct
@Conaclos Conaclos added S-Help-wanted Status: you're familiar with the code base and want to help the project A-Formatter Area: formatter L-JavaScript Language: JavaScript and super languages S-Bug-confirmed Status: report has been confirmed as a valid bug labels Nov 23, 2023
@chansuke
Copy link
Member

I'd like to work on this issue.

@ematipico
Copy link
Member

Thank you @chansuke , the issue is assigned to you

@faultyserver
Copy link
Contributor

Apologies, I believe I ended up fixing this in #1003 in response to a different issue report (#914) and didn't notice this specific case had been reported separately and already assigned :( Sorry about that.

@chansuke
Copy link
Member

chansuke commented Dec 3, 2023

@faultyserver No problem :) and thank you for sharing the update!

@Conaclos Conaclos closed this as completed Dec 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Formatter Area: formatter L-JavaScript Language: JavaScript and super languages S-Bug-confirmed Status: report has been confirmed as a valid bug S-Help-wanted Status: you're familiar with the code base and want to help the project
Projects
None yet
Development

No branches or pull requests

4 participants