--- pageClass: rule-details sidebarDepth: 0 title: vue/html-quotes description: enforce quotes style of HTML attributes since: v3.0.0 --- # vue/html-quotes > enforce quotes style of HTML attributes - :gear: This rule is included in the following preset configs: - `*.configs["flat/strongly-recommended"]` - `*.configs["flat/vue2-strongly-recommended"]` - `*.configs["flat/recommended"]` - `*.configs["flat/vue2-recommended"]` - `"plugin:vue/strongly-recommended"` - `"plugin:vue/vue2-strongly-recommended"` - `"plugin:vue/recommended"` - `"plugin:vue/vue2-recommended"` - :wrench: The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#fix-problems) can automatically fix some of the problems reported by this rule. You can choose quotes of HTML attributes from: - Double quotes: `
` - Single quotes: `
` - No quotes: `
` This rule enforces the quotes style of HTML attributes. ## :book: Rule Details This rule reports the quotes of attributes if it is different to configured quotes. ```vue ``` ## :wrench: Options Default is set to `double`. ```json { "vue/html-quotes": [ "error", "double" | "single", { "avoidEscape": false } ] } ``` String option: - `"double"` (default) ... requires double quotes. - `"single"` ... requires single quotes. Object option: - `avoidEscape` ... If `true`, allows strings to use single-quotes or double-quotes so long as the string contains a quote that would have to be escaped otherwise. ### `"single"` ```vue ``` ### `"double", { "avoidEscape": true }` ```vue ``` ## :books: Further Reading - [Style guide - Quoted attribute values](https://vuejs.org/style-guide/rules-strongly-recommended.html#quoted-attribute-values) ## :rocket: Version This rule was introduced in eslint-plugin-vue v3.0.0 ## :mag: Implementation - [Rule source](https://github.com/vuejs/eslint-plugin-vue/blob/master/lib/rules/html-quotes.js) - [Test source](https://github.com/vuejs/eslint-plugin-vue/blob/master/tests/lib/rules/html-quotes.test.ts)