Skip to content

Ignore <template> in vue/html-self-closing rule #2202

Closed
@Thomasan1999

Description

@Thomasan1999

What rule do you want to change?
vue/html-self-closing

Does this change cause the rule to produce more or fewer warnings?
N/A

How will the change be implemented? (New option, new default behavior, etc.)?
Either by default or add an option to ignore <template> the same way <style> and <script> tags are ignored. Empty <template> tags don't make sense and should either be fully-removed from the Vue template by the engineer or left alone (if that's the way the engineer prefers it).

Please provide some example code that this change will affect:

<CustomComponent>
    <template #slotName></template>
</CustomComponent>
<template></template>

What does the rule currently do for this code?

<CustomComponent>
    <template #slotName />
</CustomComponent>
<template />

What will the rule do after it's changed?
It would leave the code unaffected.

Additional context
N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions