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