在rule里面加一个规则:
"vue/html-self-closing"
rules: {
"no-unused-vars":"off",
"vue/html-self-closing": ["error", {
"html": {
"void": "always",
"normal": "never",
"component": "always"
},
"svg": "always",
"math": "always"
}],
}
参考: