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

Astro complex JSX formatting #77

Open
predaytor opened this issue Nov 5, 2024 · 2 comments
Open

Astro complex JSX formatting #77

predaytor opened this issue Nov 5, 2024 · 2 comments

Comments

@predaytor
Copy link

predaytor commented Nov 5, 2024

This code does not appear to be formatted properly. Is there a fix? Thx.
dprint.jsonc:

upd:

repro: https://stackblitz.com/~/github.com/predaytor/astro-dprint

playground: https://dprint.dev/playground/#code/DwEwlgbgBAxgNgQwM5ILwCIAOAnA9gKwFMYAXJdAPgCgBIAbxwOLIDoBbBTACi8aNIA0UPswCSIAB4BKKKgpQutGqEixEKDCNKUl9LSRYBzBHDiFsAT3aceAfSRwwIQkIdPC46bPl1dNGLgAdkgkUBKyUIEArqYA3FR+2IQkUdiBUCrQ8Mho6G7OlMAA9OAQFPE0lQC+UlVKxaXUNFK1VA2Q1EA/plugin/markup_fmt

<div class="projects">
	{
		projects.map((project, projectIdx) => (
			<div class="project">
				{
					project.gallery.map((_slide, slideIdx) => {
		const x = null;

		return <div class="slide"></div>;
	})
				}
			</div>
		))
	}
</div>

<!-- expected similar behavior (tested using typescript formatter in .tsx file): -->

<!-- <div class="projects">
	{projects.map((project, projectIdx) => (
		<div class="project">
			{project.gallery.map((_slide, slideIdx) => {
				const x = null;

				return <div class="slide"></div>;
			})}
		</div>
	))}
</div> -->
@g-plane
Copy link
Owner

g-plane commented Nov 6, 2024

Please provide a minimal reproduction, instead of a large config and a large input file.

@predaytor
Copy link
Author

updated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants