ko-lint-config 2.2.2 → 2.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.DS_Store +0 -0
- package/.eslintrc.js +18 -1
- package/.stylelintrc.js +6 -0
- package/CHANGELOG.md +18 -0
- package/package.json +1 -1
package/.DS_Store
ADDED
|
Binary file
|
package/.eslintrc.js
CHANGED
|
@@ -45,7 +45,7 @@ module.exports = {
|
|
|
45
45
|
// "warn" 或 1 - 开启规则,使用警告级别的错误:warn (不会导致程序退出)
|
|
46
46
|
// "error" 或 2 - 开启规则,使用错误级别的错误:error (当被触发的时候,程序会退出)
|
|
47
47
|
rules: {
|
|
48
|
-
semi:
|
|
48
|
+
semi: 0,
|
|
49
49
|
strict: 0,
|
|
50
50
|
// 缩进
|
|
51
51
|
indent: [
|
|
@@ -87,6 +87,13 @@ module.exports = {
|
|
|
87
87
|
],
|
|
88
88
|
},
|
|
89
89
|
],
|
|
90
|
+
// 建议驼峰命名
|
|
91
|
+
camelcase: [
|
|
92
|
+
1,
|
|
93
|
+
{
|
|
94
|
+
ignoreDestructuring: true, // 忽略解构时的驼峰命名校验
|
|
95
|
+
},
|
|
96
|
+
],
|
|
90
97
|
eqeqeq: 0,
|
|
91
98
|
'arrow-body-style': 0, // 控制箭头函数的语法形式
|
|
92
99
|
'object-shorthand': 2, // 对象的 key 和 value 一致时要求简写
|
|
@@ -129,6 +136,7 @@ module.exports = {
|
|
|
129
136
|
'no-debugger': 2,
|
|
130
137
|
'no-param-reassign': 2, // 给函数的入参赋值
|
|
131
138
|
'no-use-before-define': 0, // 使用尚未声明的变量
|
|
139
|
+
'no-async-promise-executor': 1, // new Promise 构造函数中有 async
|
|
132
140
|
|
|
133
141
|
'import/no-extraneous-dependencies': 0,
|
|
134
142
|
|
|
@@ -181,6 +189,7 @@ module.exports = {
|
|
|
181
189
|
2,
|
|
182
190
|
{ vars: 'all', args: 'none', ignoreRestSiblings: false },
|
|
183
191
|
],
|
|
192
|
+
'@typescript-eslint/semi': [2, 'always'],
|
|
184
193
|
'@typescript-eslint/no-explicit-any': 0,
|
|
185
194
|
'@typescript-eslint/explicit-member-accessibility': 0,
|
|
186
195
|
'@typescript-eslint/explicit-function-return-type': 0,
|
|
@@ -198,6 +207,14 @@ module.exports = {
|
|
|
198
207
|
allowedNames: ['self', '_this', 'that', 'ctx'], // 允许的别名,默认值 []
|
|
199
208
|
},
|
|
200
209
|
],
|
|
210
|
+
'@typescript-eslint/no-unused-vars': [
|
|
211
|
+
2,
|
|
212
|
+
{
|
|
213
|
+
argsIgnorePattern: '^_', // 函数参数忽略以下划线开头的变量
|
|
214
|
+
destructuredArrayIgnorePattern: '^_', // 解构数组忽略以下划线开头的变量
|
|
215
|
+
caughtErrorsIgnorePattern: '^err', // 捕获错误忽略以 err 开头的变量
|
|
216
|
+
},
|
|
217
|
+
],
|
|
201
218
|
|
|
202
219
|
'standard/object-curly-even-spacing': 0,
|
|
203
220
|
// standard 要求 callback 内的值不为具体值
|
package/.stylelintrc.js
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# ko-lint-config
|
|
2
2
|
|
|
3
|
+
## 2.2.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 472d7e0c: update eslint rules
|
|
8
|
+
|
|
9
|
+
## 2.2.4
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 25de5d7e: update eslint rules
|
|
14
|
+
|
|
15
|
+
## 2.2.3
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- 35a552d2: update eslint semi and stylelint config
|
|
20
|
+
|
|
3
21
|
## 2.2.2
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|