ESLint工具检查代码质量,main.js里的原代码是这样的:

new Vue({

router,

el: "#app",

template: '<App/>',

components: { App }

})

这段代码不使用ESLint检查运行是没有问题的,使用了ESLint要改成如下的形式:

 let vm = new Vue({
el: '#app',
router,
template: '<App/>',
components: { App }
});
Vue.use(vm);

ESLint不报错

相关文章:

  • 2021-08-07
  • 2022-12-23
  • 2022-01-25
  • 2021-04-15
  • 2022-12-23
  • 2022-12-23
  • 2021-10-02
  • 2021-12-23
猜你喜欢
  • 2022-12-23
  • 2021-07-06
  • 2021-09-30
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案