You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Seconding this issue as I had just experienced the same while formatting my code via the CLI, and was confused about the discrepancy - what is the prettier's team's recommendation on this? ( I noticed multiple discussions on the debate between uppercase and lowercase, including this one - while my understanding is that the prettier team recommends lowercase and enforces it by default back in 2019, I wonder is this still the case now?)
I found the reason for this problem: it seems that the Prettier VSCode plugin version 10.4.0 uses Prettier version 2.8.8 whereas the latest version of Prettier is 3.3.2 (as of today). Prettier 2.8.8 produces <!DOCTYPE html> whereas version 3.3.2 produces <!doctype html>. If you want the CLI version to match with the VSCode plugin, you should install Prettier 2.8.8 CLI. See details.
No, I don't have a preference if the doctype is lowercase or uppercase, like the below mentions:
I really don't care. But please make it at least consistent. Now I get changes in git just because Prettier formats it inconsistently.
Prettier v10.4.0
Case 1: Prettier auto-formatting in VSCode with extension.
Input:
Output:
Case 2: Prettier CLI formatting using
bunx prettier index.html
Input:
Output:
Expected behavior:
The two tools should have the same case formatting for the doctype tag, whichever it is.
The text was updated successfully, but these errors were encountered: