Vue3警告抑制

1.全局禁用

1
2
3
4
5
6
7
module.exports = {
rules: {
'vue/multi-word-component-names': 'off',
'no-unused-vars': 'off',
},
};

2.特定文件

可以在文件顶部添加以下注释:

1
2
/* eslint-disable vue/multi-word-component-names */
/* eslint-disable no-unused-vars */

3.单行代码

1
2
3
4
5
6
7
8
9
10
11
// eslint-disable-next-line vue/multi-word-component-names

export default {
name: 'Demo',
};
// eslint-disable-next-line no-unused-vars
export default {
props: ['exampleProp'],
};