16
14

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Vue.js #3Advent Calendar 2017

Day 8

Vueのインスタンス作成がESLintのno-newに抵触するのを避ける方法

Posted at

ESLintのDisallow new For Side Effects (no-new)ルールが"error"に設定されている場合、次の書き方だとエラーになる。

new Vue({
  el: '#app',
  ...
})

次のように$mountを使ってマウントすれば、その問題を回避できる。

const app = new Vue({
  ...
})

app.$mount('#app')
16
14
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
16
14

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?