Format doctype as lowercase to match Prettier 3.0 #370
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
Prettier 3.0 changed doctype to be lowercase. This PR changes prettier-plugin-astro to also set a lowercase doctype.
https://prettier.io/blog/2023/07/05/3.0.0.html#print-html5-doctype-in-lowercase-7391httpsgithubcomprettierprettierpull7391-by-fiskerhttpsgithubcomfisker
Testing
Test fixtures were updated for the expected output of lowercase doctype. There is one test fixture that was already commented out, but I updated it as well in case it is ever used again.
Docs
This is documented in the Prettier docs.