-
-
Notifications
You must be signed in to change notification settings - Fork 551
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
Add prettier and format files #371
Conversation
|
✅ Deploy Preview for astro-starlight ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
The plugin autoloading feature from Prettier was removed in v3 and the Prettier configuration file does not explicitly specify the Prettier plugin for Astro so I don't think it's running on Astro files (which may be why the diff does not contain any Astro file changes). Altho, I do not think specifying the plugin in the config would be enough as there is currently a bug in Prettier where you have to manually specify the files handled by a plugin for it to format these files, e.g. I wonder if it would not be wise to wait until this issue is fixed before introducing Prettier to the codebase? |
Thanks @HiDeoo , didn't even think to double-check the Astro files. I updated the prettier config to include the plugin and added a Completely understand if you want to hold off on this until prettier/prettier#15079 / withastro/prettier-plugin-astro#334 (comment) are resolved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this @lorenzolewis! Left a few observations. And… of course this is now conflicting 😅 Hopefully easy enough to resolve by reverting the formatting, updating branch, and then re-formatting?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at the code samples now they’re using tabs, we should probably set tab-size
for Starlight code blocks.
We can do it in a follow-up PR though so we’re not mixing formatting with meaningful code changes.
701e3a4
to
b0224d7
Compare
I found another magical button on GitHub that apparently closed this one 😅 I'll re-open another one with the suggestions included. |
What kind of changes does this PR include?
Description
prettier
andprettier-plugin-astro