microsoft / microsoft/vscode-html-languageservice
Suggestion. Add option to allow using self-closing tag on all HTML elements.
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 284
- Forks
- 138
- Avg merge
- 19h 11m
- Merged PRs (30d)
- 5
Description
<div/>
This is not valid HTML. The browser will act like the closing tag doesn't exist, like so:
<div>
And vscode will correctly mark it as wrong like so:
But many html-like languages like Vue and JSX do allow self-closing tags, but vscode still marks it as wrong. It would be nice if we could allow all tags to be self-closed by setting a value in .vscode\settings.json
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the HTML validation that reports self-closing tags and the settings handling used by the language service. Add a setting that permits self-closing syntax for all HTML elements, while keeping the existing diagnostic by default; verify the behavior for
and ordinary HTML.Written by the indexing model from the issue text.
Assessment
- Tech stack
- html, typescript
- Domain
- frontend, web-dev
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100