前言
在上一节,针对 vue3配置了ESLint,此时,App.vue
和 HelloWorld.vue
报了一个 no-unused-vars
的错误。
添加配置
vue3
是尤大写的,参考下尤大的配置:.eslintrc.js
{
'no-unused-vars': [
'error',
// we are only using this rule to check for unused arguments since TS
// catches unused variables but not args.
{ varsIgnorePattern: '.*', args: 'none' }
],
}
加上后,报错就没了。