eslint-plugin-vue
eslint-plugin-vue copied to clipboard
vue/html-indent. There is warn/error when container-tag contains only comments AND opening tag has more than one aligned attributes.
Checklist
- [x] I have tried restarting my IDE and the issue persists.
- [x] I have read the FAQ and my problem is not listed.
Tell us about your environment
- ESLint version: 7.32.0
- eslint-plugin-vue version: 8.1.1
- Node version: v14.18.1
- Operating System: Win 10
Please show your full configuration:
{
// this is not full configuration
"parser": "vue-eslint-parser",
"rules": {
"vue/attribute-hyphenation": ["off", { "ignore": [] }],
"vue/first-attribute-linebreak": "off",
"vue/html-closing-bracket-newline": "off",
"vue/html-indent": ["warn", 4, {
"baseIndent": 0,
"attribute": 1,
// "closeBracket": 0,
"alignAttributesVertically": true,
"ignores": [
"VElement[name=template].children",
"VElement[name=thead].children",
"VElement[name=tbody].children",
"ConditionalExpression"
]
}],
"vue/html-comment-indent": ["error", 4],
"vue/max-attributes-per-line": "off",
"vue/multi-word-component-names": "off",
"vue/multiline-html-element-content-newline": "off",
"vue/singleline-html-element-content-newline": "off",
"vue/no-unused-vars": "warn",
"vue/require-prop-types": "warn",
"vue/import/first": "off"
}
}
What did you do?
<template>
<section>
<div>
<select id="code-viewer-main">
<!--<option value="">Boo01</option>--> <!-- No warn -->
<option value="">Boo02</option>
<option value="">Boo03</option>
</select>
<button class="btn-copy"
@click="copy">
<!--Копировать--> <!-- Warn -->
</button>
</div>
<div>
<select id="code-viewer-main"
@click="copy">
<!--<option value="">Boo01</option>--> <!-- Warn -->
<!--<option value="">Boo02</option>-->
<!--<option value="">Boo03</option>-->
</select>
<button class="btn-copy">
<!--Копировать--> <!-- No warn -->
</button>
</div>
</section>
</template>
What did you expect to happen? No warn/errors.
What actually happened?
There is warn/error when container-tag contains only comments AND opening tag has more than one aligned attributes.

Repository to reproduce this issue