Vue常见问题解决办法,一ESLint检查报错

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不报错