luoye-fe / vue-spa-template

SPA template for vue
5 stars 3 forks source link

Dangle Commas for eslint rules when extends:'airbnb';eslint选择airbnb规则时报错 #2

Open Halooo opened 7 years ago

Halooo commented 7 years ago

if choose to extend 'airbnb' for eslint rules and run, some warnings appear: several commas in app.js, app.vue and etc. are missing object-shorthand in app.vue, needs to follow ES6 rule change {store:store} to {store}

选择airbnb 为eslint 规则时 个别文件(app.js, app.vue, hello.vue, /vuex/index.js, http.config.js)因airbnb 规则下对'comma-dangle' 的定义为{ "comma-dangle": [2, "always-multine"]},会出现警告 错误信息为object 末尾逗号缺失。

app.vue 中{store: store} 需要改为{store} 以避免因新的 ES6 规则报错(objec-shorthand)

luoye-fe commented 7 years ago

Eslint 报错的话删除 .eslintrc.js 里的规则吧,不打算更新了 :joy: 。

毕竟,是时候更新到 vue 2.x 了!

Halooo commented 7 years ago

Yes! :D