vue中Require self-closing on Vue.js custom components的解决方法
1、找到.eslintrc.js这个文件2、然后再rules中添加如下配置"vue/html-self-closing": ["error",{"html": {"void": "never","normal": "any","component": "any"},"svg": "always",...
·
1、找到.eslintrc.js这个文件
2、然后再rules中添加如下配置
"vue/html-self-closing": ["error",{
"html": {
"void": "never",
"normal": "any",
"component": "any"
},
"svg": "always",
"math": "always"
}]
整体配置如下:
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'generator-star-spacing': 'off',
"vue/html-self-closing": ["error",{
"html": {
"void": "never",
"normal": "any",
"component": "any"
},
"svg": "always",
"math": "always"
}]
}
更多推荐
已为社区贡献2条内容
所有评论(0)