在使用vue的时候,使用一个全局变量,ESLint的语法会出现ESLint: 'common' is not defined. (no-undef),说变量未定义,这时我们可以添加配置,取消这个校验。

1、在.eslintrc.js文件中添加一个配置,位置如下图所示,我的全局变量就是common。

"globals":{
  "common": true
}

vue ESLint: 'common' is not defined. (no-undef)

转载于:https://my.oschina.net/uwith/blog/3055113

相关文章:

  • 2021-12-28
  • 2021-10-07
  • 2022-12-23
  • 2021-10-05
  • 2021-05-26
  • 2021-11-24
  • 2021-10-26
  • 2021-05-17
猜你喜欢
  • 2021-10-24
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-09
相关资源
相似解决方案