✘ http://eslint.org/docs/rules/no-new Do not use 'new' for side effects src/main.js:9:1 new Vue({ ^

这个意思是说在new Vue必须赋值给某个值的,强制不让eslink抱着个错的话,只需要在new Vue实例化之前添加/* eslint-disable no-new */就可以了

// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'

Vue.config.productionTip = false

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>'
})

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容