@houheaven/eslint-config-helper 2.1.4 → 2.1.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/CHANGELOG.md ADDED
@@ -0,0 +1,122 @@
1
+ # 更新记录
2
+
3
+ > @houheaven/eslint-config-helper
4
+
5
+
6
+ ## v2.1.6
7
+
8
+ `发布:2026-11-23`
9
+ <!-- 开发:2026-11-23 -->
10
+ - 新增 `CHANGELOG.md` 变更记录文档
11
+
12
+
13
+ ## v2.1.5
14
+
15
+ `发布:2026-11-23`
16
+ <!-- 开发:2026-11-23 -->
17
+ - 迁移 `no-extra-parens` 规则至 `@stylistic/no-extra-parens`
18
+
19
+
20
+ ## v2.1.2
21
+
22
+ `发布:2026-03-19`
23
+ <!-- 开发:2026-03-18 -->
24
+ - 代码优化
25
+
26
+
27
+ ## v2.1.1
28
+
29
+ `发布:2026-03-18`
30
+ <!-- 开发:2026-03-07 -->
31
+ - 代码优化
32
+
33
+
34
+ ## v2.1.0
35
+
36
+ `发布:2026-03-06`
37
+ <!-- 开发:2026-03-05 -->
38
+ - 项目使用 monorepo 重构
39
+ - 优化:使用 `@rushstack/eslint-patch` 取代 `.npmrc`,实现类库的 ”开箱即用“
40
+
41
+
42
+ ## v2.0.0
43
+
44
+ `发布:2026-03-04`
45
+ <!-- 开发:2023-04-22 -->
46
+ - 代码重构
47
+ - 新增:`@houheaven/eslint-config-helper/es5`
48
+ - 新增:`@houheaven/eslint-config-helper/es6`
49
+ - 新增:`@houheaven/eslint-config-helper/typescript`
50
+ - 新增:`@houheaven/eslint-config-helper/import`
51
+ - 新增:`@houheaven/eslint-config-helper/vue2`
52
+ - 新增:`@houheaven/eslint-config-helper/vue3`
53
+ - 新增:`@houheaven/eslint-config-helper/vue3-ts`
54
+ - 新增:`@houheaven/eslint-config-helper/html`
55
+ - 新增:`@houheaven/eslint-config-helper/format-es6`
56
+ - 新增:`@houheaven/eslint-config-helper/format-es5`
57
+ - 新增:`@houheaven/eslint-config-helper/format-typescript`
58
+ - 新增:`@houheaven/eslint-config-helper/format-import`
59
+ - 新增:`@houheaven/eslint-config-helper/format-vue2`
60
+ - 新增:`@houheaven/eslint-config-helper/format-vue3`
61
+ - 新增:`@houheaven/eslint-config-helper/format-html`
62
+ - 新增:`@houheaven/eslint-config-helper/utils`
63
+
64
+
65
+ ## v1.4.0
66
+
67
+ `发布:2023-03-29`
68
+ <!-- 开发:2023-03-29 -->
69
+ - 支持 typescript 校验:@houheaven/eslint-config-helper/typescript
70
+ - 关闭了 `eslint` 中的 lines-between-class-members 规则
71
+
72
+
73
+ ## v1.3.1
74
+
75
+ `发布:2023-03-28`
76
+ <!-- 开发:2023-03-28 -->
77
+ - 新增 依赖包:`@babel/eslint-parser`(支持 ECMAScript 最新语法)
78
+
79
+
80
+ ## v1.3.0
81
+
82
+ `发布:2022-10-09`
83
+ <!-- 开发:2022-10-09 -->
84
+ - 代码重构
85
+
86
+
87
+ ## v1.2.2
88
+
89
+ `发布:2022-10-05`
90
+ <!-- 开发:2022-10-05 -->
91
+ - 关闭了 `eslint-plugin-import` 中的 import/no-nodejs-modules 规则
92
+
93
+
94
+ ## v1.2.1
95
+
96
+ `发布:2022-09-28`
97
+ <!-- 开发:2022-09-28 -->
98
+ - 优化了 `eslint` 中的 new-cap 规则
99
+
100
+
101
+ ## v1.2.0
102
+
103
+ `发布:2022-09-22`
104
+ <!-- 开发:2022-09-15 -->
105
+ - 代码重构
106
+ - 支持 javascript 校验:@houheaven/eslint-config-helper
107
+ - 支持 vue2 校验:@houheaven/eslint-config-helper/vue2
108
+ - 支持 vue3 校验:@houheaven/eslint-config-helper/vue3
109
+ - 支持 html 校验:@houheaven/eslint-config-helper/html
110
+ - 调整了部分规则
111
+
112
+
113
+ ## v1.1.0
114
+
115
+ `发布:2022-09-05`
116
+ - 代码重构
117
+
118
+
119
+ ## v1.0.0
120
+
121
+ `发布:2022-09-05`
122
+ - 初始版本
@@ -128,5 +128,21 @@ module.exports = {
128
128
  // ❌ 已废弃
129
129
  // https://zh-hans.eslint.org/docs/latest/rules/valid-jsdoc
130
130
  "valid-jsdoc": "off",
131
+
132
+ // 禁止冗余的括号
133
+ // https://zh-hans.eslint.org/docs/latest/rules/no-extra-parens
134
+ "no-extra-parens": ["warn", "all", {
135
+ conditionalAssign: false, // 允许在条件测试表达式中的赋值周围加上括号
136
+ returnAssign: false, // 允许在 return 语句中使用额外的小括号
137
+ nestedBinaryExpressions: false, // 允许在嵌套二进制表达式中使用额外的小括号
138
+ ternaryOperandBinaryExpressions: false, // 允许在三元运算符 ?: 的操作数周围添加额外的括号
139
+ ignoreJSX: "all", // 允许在没有/所有/多行/单行 JSX 组件周围使用额外的小括号,delegate to eslint-plugin-react
140
+ // enforceForArrowConditionals: false, // 废弃 - 允许在作为箭头函数主体的三元表达式周围添加小括号
141
+ enforceForSequenceExpressions: false, // 允许在序列表达式周围加上小括号
142
+ // enforceForNewInMemberExpressions: false, // 废弃 - 允许在成员表达式中的 new 表达式周围使用额外的小括号
143
+ enforceForFunctionPrototypeMethods: false, // 允许在函数表达式的即时 .call 和 .apply 方法调用周围以及同一上下文中的函数表达式周围添加括号
144
+ allowParensAfterCommentPattern: "", // 允许在匹配正则表达式的注释前面加上额外的括号
145
+ // nestedConditionalExpressions: false, // 允许在嵌套的条件表达式周围添加额外的小括号
146
+ }],
131
147
  },
132
148
  };
@@ -237,23 +237,6 @@ module.exports = {
237
237
  ignoreChainWithDepth: 4,
238
238
  }],
239
239
 
240
- // TODO
241
- // 禁止冗余的括号
242
- // https://zh-hans.eslint.org/docs/latest/rules/no-extra-parens
243
- "no-extra-parens": ["warn", "all", {
244
- conditionalAssign: false, // 允许在条件测试表达式中的赋值周围加上括号
245
- returnAssign: false, // 允许在 return 语句中使用额外的小括号
246
- nestedBinaryExpressions: false, // 允许在嵌套二进制表达式中使用额外的小括号
247
- ternaryOperandBinaryExpressions: false, // 允许在三元运算符 ?: 的操作数周围添加额外的括号
248
- ignoreJSX: "all", // 允许在没有/所有/多行/单行 JSX 组件周围使用额外的小括号,delegate to eslint-plugin-react
249
- enforceForArrowConditionals: false, // 废弃 - 允许在作为箭头函数主体的三元表达式周围添加小括号
250
- enforceForSequenceExpressions: false, // 允许在序列表达式周围加上小括号
251
- enforceForNewInMemberExpressions: false, // 废弃 - 允许在成员表达式中的 new 表达式周围使用额外的小括号
252
- enforceForFunctionPrototypeMethods: false, // 允许在函数表达式的即时 .call 和 .apply 方法调用周围以及同一上下文中的函数表达式周围添加括号
253
- allowParensAfterCommentPattern: "", // 允许在匹配正则表达式的注释前面加上额外的括号
254
- // nestedConditionalExpressions: false, // 允许在嵌套的条件表达式周围添加额外的小括号
255
- }],
256
-
257
240
  // 禁止空格和 tab 的混合缩进
258
241
  "no-mixed-spaces-and-tabs": "error",
259
242
 
@@ -20,5 +20,19 @@ module.exports = {
20
20
  maxBOF: 1,
21
21
  maxEOF: 1,
22
22
  }],
23
+
24
+ // 禁止冗余的括号
25
+ // https://eslint.style/rules/no-extra-parens
26
+ "@stylistic/no-extra-parens": ["warn", "all", {
27
+ conditionalAssign: false, // 允许在条件测试表达式中的赋值周围加上括号
28
+ returnAssign: false, // 允许在 return 语句中使用额外的小括号
29
+ nestedBinaryExpressions: false, // 允许在嵌套二进制表达式中使用额外的小括号
30
+ ternaryOperandBinaryExpressions: false, // 允许在三元运算符 ?: 的操作数周围添加额外的括号
31
+ ignoreJSX: "all", // 允许在没有/所有/多行/单行 JSX 组件周围使用额外的小括号,delegate to eslint-plugin-react
32
+ enforceForSequenceExpressions: false, // 允许在序列表达式周围加上小括号
33
+ enforceForFunctionPrototypeMethods: false, // 允许在函数表达式的即时 .call 和 .apply 方法调用周围以及同一上下文中的函数表达式周围添加括号
34
+ allowParensAfterCommentPattern: "", // 允许在匹配正则表达式的注释前面加上额外的括号
35
+ nestedConditionalExpressions: false, // 允许在嵌套的条件表达式周围添加额外的小括号
36
+ }],
23
37
  },
24
38
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@houheaven/eslint-config-helper",
3
- "version": "2.1.4",
3
+ "version": "2.1.6",
4
4
  "description": "Eslint 规则助手",
5
5
  "author": "立树",
6
6
  "license": "MIT",