You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
637 B
JavaScript

3 years ago
module.exports = {
root: true,//限定配置文件的使用范围
env: { //指定了环境
node: true
},
'extends': [ //指定eslint规范
'plugin:vue/essential',//
'eslint:recommended'//启用推荐的规则https://eslint.bootcss.com/docs/rules/
],
parserOptions: { //设置解析器选项
parser: '@babel/eslint-parser' //该 parser 允许你使用 ESLint 校验所有 babel code。
},
rules: { //启用额外的规则或覆盖默认的规则
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off'
}
}