vue-cli 4.0 x 關閉eslint

eslint非常煩,數組對象最後竟然都要加逗號,受不了這種語法,直接給關閉了,在 vue.config.js:中加入選項 lintOnSave: false

就可以了 

module.exports = {
  lintOnSave: false
}

原文

ESLint can be configured via .eslintrc or the eslintConfig field in package.json.

Lint-on-save during development with eslint-loader is enabled by default. It can be disabled with the lintOnSave option in vue.config.js:

module.exports = {
  lintOnSave: false
}
When set to true, eslint-loader will emit lint errors as warnings. By default, warnings are only logged to the terminal and does not fail the compilation.

 

https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-eslint

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章