// https://eslint.org/docs/user-guide/configuring module.exports = { root: true, parser: 'babel-eslint', parserOptions: { sourceType: 'module', ecmaFeatures: { experimentalObjectRestSpread: true, jsx: true } }, env: { browser: true, }, // https://github.com/standard/standard/blob/master/docs/RULES-en.md extends: 'standard', // required to lint *.vue files plugins: [ 'html' ], // add your custom rules here 'rules': { // tab缩进 'indent': [ 'error', 'tab' ], // 单引号引用字符串 'quotes': [ 'error', 'single' ], // 必须使用分号结束 'semi': [ 'error', 'always' ], // 允许tab缩进 'no-tabs': 'off', // 关闭===检测 'eqeqeq': 'off', // 允许多行空行 'no-multiple-empty-lines': 'off', // 允许多余空格 'no-trailing-spaces': 'off', // 取消函数名与前括号之间的空格 'space-before-function-paren': 'off', // 取消关键字后空格 'keyword-spacing': 'off', // end of file last line 'eol-last': 'off', 'one-var': 'off', // promise reject不需要error对象 'prefer-promise-reject-errors': 'off', // allow debugger during development 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0 } }