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