ko-lint-config 2.2.4 → 2.2.7

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/.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 一致时要求简写
@@ -200,6 +207,14 @@ module.exports = {
200
207
  allowedNames: ['self', '_this', 'that', 'ctx'], // 允许的别名,默认值 []
201
208
  },
202
209
  ],
210
+ '@typescript-eslint/no-unused-vars': [
211
+ 2,
212
+ {
213
+ argsIgnorePattern: '^_', // 函数参数忽略以下划线开头的变量
214
+ destructuredArrayIgnorePattern: '^_', // 解构数组忽略以下划线开头的变量
215
+ caughtErrorsIgnorePattern: '^err', // 捕获错误忽略以 err 开头的变量
216
+ },
217
+ ],
203
218
 
204
219
  'standard/object-curly-even-spacing': 0,
205
220
  // standard 要求 callback 内的值不为具体值
package/.prettierrc.js CHANGED
@@ -1,7 +1,7 @@
1
1
  module.exports = {
2
2
  semi: true, // 行末添加分号
3
3
  tabWidth: 4, // tab 缩进,默认 2
4
- printWidth: 200, // 换行列数,默认 80
4
+ printWidth: 100, // 换行列数,默认 80
5
5
  singleQuote: true, // 单引号
6
6
  useTabs: false, // 使用 tab 缩进,默认 false 使用空格
7
7
  bracketSpacing: true, // 对象中打印空格 默认 true
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.7
4
+
5
+ ### Patch Changes
6
+
7
+ - edb4ae7e: change prettier config
8
+
9
+ ## 2.2.6
10
+
11
+ ### Patch Changes
12
+
13
+ - 5f645514: update stylelint rules
14
+
15
+ ## 2.2.5
16
+
17
+ ### Patch Changes
18
+
19
+ - 472d7e0c: update eslint rules
20
+
3
21
  ## 2.2.4
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.4",
3
+ "version": "2.2.7",
4
4
  "description": "lint configs about eslint stylelint and prettier",
5
5
  "main": "index.js",
6
6
  "files": [