Skip to content

Latest commit

 

History

History
47 lines (31 loc) · 1.16 KB

html-quotes.md

File metadata and controls

47 lines (31 loc) · 1.16 KB

enforce quotes style of HTML attributes (vue/html-quotes)

  • ⚙️ This rule is included in "plugin:vue/recommended".
  • 🔧 The --fix option on the command line can automatically fix some of the problems reported by this rule.

You can choose quotes of HTML attributes from:

  • Double quotes: <div class="foo">
  • Single quotes: <div class='foo'>
  • No quotes: <div class=foo>

This rule enforces the quotes style of HTML attributes.

📖 Rule Details

This rule reports the quotes of attributes if it is different to configured quotes.

👎 Examples of incorrect code for this rule:

<img src='./logo.png'>
<img src=./logo.png>

👍 Examples of correct code for this rule:

<img src="./logo.png">

👎 Examples of incorrect code for this rule with "single" option:

<img src="./logo.png">
<img src=./logo.png>

👍 Examples of correct code for this rule with "single" option:

<img src='./logo.png'>

🔧 Options

  • "double" (default) ... requires double quotes.
  • "single" ... requires single quotes.