Skip to content

Commit a9bc77b

Browse files
committed
refactor: 调整 eslint级别为recommended
1 parent e095595 commit a9bc77b

File tree

126 files changed

+3767
-1927
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+3767
-1927
lines changed

.eslintrc.js

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,26 @@ module.exports = {
33
env: {
44
node: true
55
},
6-
extends: ["plugin:vue/essential", "@vue/prettier"],
6+
extends: ['plugin:vue/recommended', 'standard'],
77
rules: {
8-
"no-console": process.env.NODE_ENV === "production" ? "error" : "off",
9-
"no-debugger": process.env.NODE_ENV === "production" ? "error" : "off"
8+
// allow paren-less arrow functions
9+
'arrow-parens': 0,
10+
// allow async-await
11+
'generator-star-spacing': 'off',
12+
// allow debugger during development
13+
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
14+
// 关闭语句强制分号结尾
15+
'semi': [2, 'always'],
16+
// 两个空行
17+
'indent': ['error', 2],
18+
// 判断无等号
19+
'padded-blocks': 0,
20+
'no-useless-escape': 0,
21+
22+
// 全等于
23+
eqeqeq: 0
1024
},
1125
parserOptions: {
12-
parser: "babel-eslint"
26+
parser: 'babel-eslint'
1327
}
1428
};

babel.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module.exports = {
2-
presets: ["@vue/app"]
2+
presets: ['@vue/app']
33
};

0 commit comments

Comments
 (0)