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

When outputting yml files, Toolpad should respect the user's prettier config #2585

Closed
6 tasks done
Janpot opened this issue Aug 30, 2023 · 6 comments
Closed
6 tasks done
Labels
enhancement This is not a bug, nor a new feature waiting for 👍 Waiting for upvotes

Comments

@Janpot
Copy link
Member

Janpot commented Aug 30, 2023

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Summary 💡

I have a prettier configuration in my project. The files that Toolpad outputs and updates should respect my prettier configuration.
This should apply at least to the files that are intended to be hand-editable. It shouldn't apply to the build artifacts.

Examples 🌈

No response

Motivation 🔦

To avoid users from having to ignore them https://github.com/mui/mui-public/pull/133/files#diff-a0fdacd2ade87c5238dde44378f574f7e123e669acdf8b740878b14b33b20275R5
(cc @oliviertassinari I noticed this on your PR)

@Janpot Janpot added status: waiting for maintainer These issues haven't been looked at yet by a maintainer enhancement This is not a bug, nor a new feature waiting for 👍 Waiting for upvotes and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Aug 30, 2023
@JerryWu1234
Copy link
Contributor

Can I make sure how to implement it?
Generate the yml file after invoking the local formatting, or by default. right?

@Janpot
Copy link
Member Author

Janpot commented Sep 5, 2023

Easiest way would be to format newContent with prettier. We can use resolveConfig with the filePath and then format newContent

@JerryWu1234
Copy link
Contributor

image

@oliviertassinari
Copy link
Member

Should we close this issue? #2638 was merged

@Janpot
Copy link
Member Author

Janpot commented Sep 11, 2023

We still need to address formatting new components and new functions when they are initialized.

@JerryWu1234
Copy link
Contributor

I'm going to do both in one pr
Next, I'll develop a search of the input.

This was referenced Sep 12, 2023
@Janpot Janpot closed this as completed Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This is not a bug, nor a new feature waiting for 👍 Waiting for upvotes
Projects
None yet
Development

No branches or pull requests

3 participants