根据报错,在eslintc.js文件的rules中添加对应的规则设置为' off '即可
module.exports = { root: true, parserOptions: { parser: 'babel-eslint' }, env: { browser: true, }, extends: [ 'plugin:vue/essential', 'standard' ], plugins: [ 'vue' ], rules: { 'no-unused-vars': 'off', 'linebreak-style': [0, 'windows'], 'no-multi-spaces': 1, 'no-multi-str': 2, 'no-multiple-empty-lines': [1, { 'max': 2 }], 'generator-star-spacing': 'off', 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off', 'no-tabs': 'off', 'indent': 'off', 'space-before-function-paren': 'off', // 关闭 Infix operators must be spaced 规则 "space-in-parens":'off', "space-infix-ops":'off', "spaced-comment": 'off', "comma-spacing": 'off' , "key-spacing": 'off', "keyword-spacing": 'off' } }
比如: