sgxt_web/.eslintrc.js

49 lines
1.6 KiB
JavaScript
Raw Normal View History

2025-04-12 14:54:02 +08:00
// ESLint 配置文件遵循 commonJS 的导出规则,所导出的对象就是 ESLint 的配置对象
// 文档https://eslint.bootcss.com/docs/user-guide/configuring
module.exports = {
// 表示当前目录即为根目录ESLint 规则将被限制到该目录下
root: true,
// env 表示启用 ESLint 检测的环境
env: {
// 在 node 环境下启动 ESLint 检测
node: false
},
// ESLint 中基础配置需要继承的配置
extends: ['plugin:vue/vue3-essential', '@vue/standard'],
// 解析器
parserOptions: {
parser: 'babel-eslint'
},
// 启用的规则及其各自的错误级别
/**
* 错误级别分为三种
* "off" 0 - 关闭规则
* "warn" 1 - 开启规则使用警告级别的错误warn (不会导致程序退出)
* "error" 2 - 开启规则使用错误级别的错误error (当被触发的时候程序会退出)
*/
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'space-before-function-paren': 'off',
'semi': 'off',
'spaced-comment': 'off',
'quotes': 'off',
'prefer-const': 'off',
'import/first': 'off',
'no-unused-vars':'off',
"no-tabs":"off",
"no-undef":"off",
"no-multi-spaces":"off",
"no-irregular-whitespace":"off",
"no-unreachable":"off",
"comma-spacing":"off",
"one-var":"off",
"no-useless-escape":"off",
"vue/no-mutating-props":"off",
"quote-props":"off",
"vue/require-valid-default-prop":"off",
"eqeqeq":"off",
"camelcase":"off",
"no-redeclare":"off"
}
};