Closed
Description
Tell us about your environment
- ESLint Version: 4.18.2
- eslint-plugin-vue Version: 4.3.0
- Node Version: 9.5.0
Please show your full configuration:
module.exports = {
root: true,
plugins: ["vue"],
extends: [
"eslint:recommended",
"plugin:vue/recommended",
],
rules: {
"no-mixed-spaces-and-tabs" : ["error", "smart-tabs"],
"vue/html-indent": ["error", "tab", {"alignAttributesVertically": true}],
"vue/max-attributes-per-line": ["error", {
"multiline": {
"allowFirstLine": true,
},
}],
},
};
What did you do? Please include the actual source code causing the issue.
<template>
<img src="/example.png"
alt="Sample Image">
</template>
<script>
export default {
};
</script>
With tabs/spaces made explicit:
<template>
» <img·src="/example.png"
» ·····alt="Sample·Image">
</template>
<script>
» export·default·{
» };
</script>
What did you expect to happen?
Should not raise html-indent error.
What actually happened? Please include the actual, raw output from ESLint.
$ ./node_modules/.bin/eslint component.vue
/home/lukeshu/t/component.vue
3:2 error Expected "\t" character, but found " " character vue/html-indent
✖ 1 problem (1 error, 0 warnings)
1 error, 0 warnings potentially fixable with the `--fix` option.
Commentary
This is roughly a re-opening of #321 .
you should ... stick to one convention instead.
This is sticking to one convention, the SmartTabs convention, a convention supported by ESLint proper. "tabs for indentation, spaces for alignment"