// https://eslint.org/docs/user-guide/configuring module.exports = { root: true, env: { browser: true }, extends: [ 'plugin:vue/essential', // https://github.com/standard/standard/blob/master/docs/RULES-en.md 'standard', 'plugin:import/errors', 'plugin:import/warnings', 'plugin:promise/recommended', 'prettier', 'prettier/vue' ], // required to lint *.vue files plugins: ['vue', 'prettier', 'import', 'promise'], // add your custom rules here rules: { // allow async-await 'prettier/prettier': 'error', 'standard/computed-property-even-spacing': 0, 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0, 'no-console': process.env.NODE_ENV === 'production' ? 2 : 0, 'promise/always-return': 0, 'promise/valid-params': 0 // 'generator-star-spacing': 'off', // indent: ['error', 4, { SwitchCase: 1 }], // quotes: [2, 'single'], // 'space-before-function-paren': 0, // semi: [2, 'always'], // 'no-ternary': 0, //禁止使用三目运算符 // 'no-nested-ternary': 0, //禁止使用嵌套的三目运算 // allow debugger during development }, settings: { 'import/resolver': { node: { paths: ['@', 'vue$'], extensions: ['*', '.js', '.vue', '.json'] } } } };