From f042e49709ca11d923ca948ba6045858c0b27da4 Mon Sep 17 00:00:00 2001 From: Joe Mooring Date: Thu, 13 Feb 2025 20:16:28 -0800 Subject: [PATCH] dev: Add prettier-plugin-void-html This is a Prettier plugin to format void HTML elements using the void tag syntax instead of self-closing syntax. Additionally, if self-closing syntax is used on non-void elements, then they will be "unwrapped" so that both the opening and closing tags are present. --- .prettierrc | 5 ++++- package.json | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.prettierrc b/.prettierrc index cf04e7521..395ae39af 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,5 +1,8 @@ { - "plugins": ["prettier-plugin-go-template"], + "plugins": [ + "prettier-plugin-go-template", + "@awmottaz/prettier-plugin-void-html" + ], "overrides": [ { "files": ["*.html"], diff --git a/package.json b/package.json index 86901377a..937bff5b0 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "author": "", "license": "", "devDependencies": { + "@awmottaz/prettier-plugin-void-html": "^1.8.0", "@tailwindcss/cli": "^4.0.0", "@tailwindcss/typography": "^0.5.15", "prettier": "^3.5.0",