Skip to content

Commit 899c313

Browse files
committedNov 15, 2021
fix: eslint修复格式化问题
1 parent 55d8d79 commit 899c313

File tree

252 files changed

+12337
-12397
lines changed

Some content is hidden

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

252 files changed

+12337
-12397
lines changed
 

‎.eslintignore

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
unpackage
2-
node_modules
3-
uview-ui
1+
unpackage
2+
node_modules
3+
coverage
4+
static/common/*

‎.eslintrc.js

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
module.exports = {
2+
extends: ['eslint-config-egg', 'airbnb'],
3+
rules: {
4+
// 关闭严格模式的提示
5+
strict: 0,
6+
// 强制4个空格缩进
7+
indent: ['error', 4],
8+
// 不允许出现分号
9+
semi: ['error', 'never'],
10+
// 是否检查连续等号赋值
11+
'no-multi-assign': 0,
12+
// 要求 require() 出现在顶层模块作用域中,禁止它
13+
'global-require': 0,
14+
// 允许console,覆盖来自airbnb的规则
15+
'no-console': 'off',
16+
'no-underscore-dangle': 'off',
17+
'prefer-rest-params': 'off',
18+
// 禁用对象最后一个属性的逗号
19+
'comma-dangle': ['error', 'never'],
20+
// 可以使用未定义的变量,因为会全局引用uni对象
21+
'no-undef': 'off',
22+
// 允许lf和crlf文件行尾
23+
'linebreak-style': 'off',
24+
'jsdoc/check-tag-names': 'off'
25+
}
26+
}

0 commit comments

Comments
 (0)
Please sign in to comment.