module.exports = { root: true, env: { node: true, }, 'extends': [ 'eslint:recommended', 'plugin:vue/essential', '@vue/standard', ], globals: { 'DirewolfLibrary': true, 'AesUtil': true, 'CryptoJS': true, 'JSEncrypt': true, 'VueRouter': true, 'PROJECT_CONFIG': true, }, rules: { 'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off', 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off', // 仅在多行时添加末尾逗号,注意不要将方法调用拆成多行,否则将被自动添加 'comma-dangle': [1, 'always-multiline'], // 开发人员可以通过注释表示switch中未添加break或return是自己的设计而不是遗漏 'no-fallthrough': ['error', { 'commentPattern': 'break[\\s\\w]*omitted' }], // 指定script标签下的代码缩进,结合下面overrides关闭原缩进规则 'vue/script-indent': ['error', 2, { 'baseIndent': 1 }], }, overrides: [ { 'files': ['*.vue'], 'rules': { 'indent': 'off', }, }, ], parserOptions: {}, }