Vue html self closing

vue/html-self-closing ​

This rule aims to enforce the self-closing sign as the configured style.

In Vue.js template, we can use either two styles for elements which don’t have their content.

Self-closing is simple and shorter, but it’s not supported in the HTML spec.

🔧 Options ​

 "vue/html-self-closing": ["error",  "html":  "void": "never", "normal": "always", "component": "always" >, "svg": "always", "math": "always" >] >
  • html.void ( «never» by default) . The style of well-known HTML void elements.
  • html.normal ( «always» by default) . The style of well-known HTML elements except void elements.
  • html.component ( «always» by default) . The style of Vue.js custom components.
  • svg ( «always» by default) . The style of well-known SVG elements.
  • math ( «always» by default) . The style of well-known MathML elements.

Every option can be set to one of the following values:

  • «always» . Require self-closing at elements which don’t have their content.
  • «never» . Disallow self-closing.
  • «any» . Don’t enforce self-closing style.

html: ​

📚 Further Reading ​

🚀 Version ​

This rule was introduced in eslint-plugin-vue v3.11.0

Источник

# vue/html-self-closing

This rule aims to enforce the self-closing sign as the configured style.

In Vue.js template, we can use either two styles for elements which don’t have their content.

Self-closing is simple and shorter, but it’s not supported in the HTML spec.

# 🔧 Options

 "vue/html-self-closing": ["error",  "html":  "void": "never", "normal": "always", "component": "always" >, "svg": "always", "math": "always" >] > 
  • html.void ( «never» by default) . The style of well-known HTML void elements.
  • html.normal ( «always» by default) . The style of well-known HTML elements except void elements.
  • html.component ( «always» by default) . The style of Vue.js custom components.
  • svg ( «always» by default) . The style of well-known SVG elements.
  • math ( «always» by default) . The style of well-known MathML elements.

Every option can be set to one of the following values:

  • «always» . Require self-closing at elements which don’t have their content.
  • «never» . Disallow self-closing.
  • «any» . Don’t enforce self-closing style.

Источник

Читайте также:  Demon в php что такое
Оцените статью