1
This commit is contained in:
49
.eslintrc.js
Normal file
49
.eslintrc.js
Normal file
@ -0,0 +1,49 @@
|
||||
// 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"
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user