Skip to content

[DO NOT MERGE] Do not add / to HTML void tags#15021

Open
jonathanKingston wants to merge 1 commit intoprettier:mainfrom
jonathanKingston:jkt/html-void-tag
Open

[DO NOT MERGE] Do not add / to HTML void tags#15021
jonathanKingston wants to merge 1 commit intoprettier:mainfrom
jonathanKingston:jkt/html-void-tag

Conversation

@jonathanKingston
Copy link
Copy Markdown

@jonathanKingston jonathanKingston commented Jul 6, 2023

Description

Rebase/rewrite of #8628 by @fisker to resolve #5246 as there is renewed interest by @jakearchibald see: https://twitter.com/jaffathecake/status/1676843832284004353

Checklist

  • I’ve added tests to confirm my change works.
  • (If changing the API or CLI) I’ve documented the changes I’ve made (in the docs/ directory).
  • (If the change is user-facing) I’ve added my changes to changelog_unreleased/*/XXXX.md file following changelog_unreleased/TEMPLATE.md.
  • I’ve read the contributing guidelines.

Try the playground for this PR

@so1ve
Copy link
Copy Markdown
Contributor

so1ve commented Aug 8, 2023

You can mark this pull request as draft if it is not ready for review.

@lrusso
Copy link
Copy Markdown

lrusso commented Aug 13, 2023

@jonathanKingston great job! I'm applying this code by using patch-package, which is working properly for what I noticed.

@lrusso
Copy link
Copy Markdown

lrusso commented Sep 9, 2023

The issue (#5246) was reported 5 years ago and the PR was submitted already. The code provides what is requested as something optional, not mandatory. Can someone take a look at this please?

cc: @fisker @sosukesuzuki @thorn0

@brdillin
Copy link
Copy Markdown

brdillin commented May 1, 2024

@fisker @sosukesuzuki @thorn0 please?

@lrusso
Copy link
Copy Markdown

lrusso commented May 1, 2024

@brdillin they won't do anything, similar tools are doing this but they won't do anything no matter what, simple as that (#5246). However, we are lucky because a modern developer recently designed a plugin for this https://github.com/awmottaz/prettier-plugin-void-html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add an option to prefer void tags over self closing tags.

4 participants