ESLint: Disallow self-closing on HTML void elements (<img/>).(vue/html-self-
和
ESLint: Require self-closing on Vue.js custom components (<el-image>).(vue/h
都是正常写的。不知道哪里错了。
该怎么设置呢?
我的配置:
module.exports = {
parserOptions: {
parser: 'babel-eslint',
sourceType: 'module'
},
env: {
browser: true,
node: true,
es6: true,
},
extends: ['plugin:vue/recommended', 'eslint:recommended'],
rules: {
"no-unused-vars":"off",
"vue/html-self-closing": ["error", {
"html": {
"void": "always",
"normal": "never",
"component": "always"
},
"svg": "always",
"math": "always"
}],
}
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…