ko-lint-config 2.2.3 → 2.2.6

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 ADDED
Binary file
package/.eslintrc.js CHANGED
@@ -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
 
@@ -199,6 +207,14 @@ module.exports = {
199
207
  allowedNames: ['self', '_this', 'that', 'ctx'], // 允许的别名,默认值 []
200
208
  },
201
209
  ],
210
+ '@typescript-eslint/no-unused-vars': [
211
+ 2,
212
+ {
213
+ argsIgnorePattern: '^_', // 函数参数忽略以下划线开头的变量
214
+ destructuredArrayIgnorePattern: '^_', // 解构数组忽略以下划线开头的变量
215
+ caughtErrorsIgnorePattern: '^err', // 捕获错误忽略以 err 开头的变量
216
+ },
217
+ ],
202
218
 
203
219
  'standard/object-curly-even-spacing': 0,
204
220
  // standard 要求 callback 内的值不为具体值
package/.stylelintrc.js CHANGED
@@ -6,13 +6,7 @@ module.exports = {
6
6
  rules: {
7
7
  // null 为关闭规则
8
8
  indentation: 4, // 缩进4格
9
- 'at-rule-no-unknown': [
10
- // 允许未知规则,如 @extend
11
- true,
12
- {
13
- ignoreAtRules: ['mixin', 'include', 'extend'],
14
- },
15
- ],
9
+ 'at-rule-no-unknown': null, // 允许未知规则
16
10
  'declaration-empty-line-before': 'never', // 第一条属性声明前不允许有空行
17
11
  'selector-class-pattern': '[a-zA-Z]+', // className 的大小写
18
12
  // 规则之前的空行
@@ -26,7 +20,12 @@ module.exports = {
26
20
  'color-function-notation': 'legacy', // 颜色 rgba 等使用传统逗号隔开
27
21
  'color-hex-case': 'upper', // 颜色十六进制字符大写
28
22
  'selector-list-comma-newline-after': 'always-multi-line',
29
- 'max-line-length': 300, // 最大宽度
23
+ 'max-line-length': [
24
+ 300,
25
+ {
26
+ ignore: ['non-comments'],
27
+ },
28
+ ],
30
29
  'font-family-no-missing-generic-family-keyword': null, // 是否必须包含通用字体
31
30
  'no-descending-specificity': null, // 选择器顺序
32
31
  'keyframes-name-pattern': null, // keyframes 推荐小写+连字符命名
@@ -39,5 +38,11 @@ module.exports = {
39
38
  ignorePseudoClasses: ['global'],
40
39
  },
41
40
  ],
41
+ 'selector-no-vendor-prefix': [
42
+ true,
43
+ {
44
+ ignoreSelectors: ['::-webkit-input-placeholder'],
45
+ },
46
+ ],
42
47
  },
43
48
  };
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # ko-lint-config
2
2
 
3
+ ## 2.2.6
4
+
5
+ ### Patch Changes
6
+
7
+ - 5f645514: update stylelint rules
8
+
9
+ ## 2.2.5
10
+
11
+ ### Patch Changes
12
+
13
+ - 472d7e0c: update eslint rules
14
+
15
+ ## 2.2.4
16
+
17
+ ### Patch Changes
18
+
19
+ - 25de5d7e: update eslint rules
20
+
3
21
  ## 2.2.3
4
22
 
5
23
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ko-lint-config",
3
- "version": "2.2.3",
3
+ "version": "2.2.6",
4
4
  "description": "lint configs about eslint stylelint and prettier",
5
5
  "main": "index.js",
6
6
  "files": [