eslint-plugin-better-codes 1.4.13 → 1.4.14

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/README.md CHANGED
@@ -85,11 +85,16 @@ module.exports = {
85
85
 
86
86
  ### 功能新增
87
87
 
88
- ### Bug修复
88
+ ### 功能调整
89
+ #### 1.4.14
90
+
91
+ 取消`long-expression-with-optional-chain`规则中对于例如`new echarts.graphic.LinearGradient()`中`.LinearGradient()`的校验
89
92
 
93
+ ### Bug修复
90
94
  #### 1.4.12
91
95
 
92
96
  修复`long-expression-with-optional-chain`规则中对于例如`obj.user.getName().num`中的`getName().num`不会进行校验的情况
93
97
 
98
+
94
99
  ## 许可证
95
100
  MIT
@@ -31,6 +31,10 @@ module.exports = {
31
31
  ) {
32
32
  return;
33
33
  }
34
+ // 如果当前成员表达式是 `new` 的 callee(例如 `new a.b.C()`),跳过校验
35
+ if (p.type === "NewExpression" && p.callee === anc) {
36
+ return;
37
+ }
34
38
  anc = p;
35
39
  }
36
40
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-better-codes",
3
- "version": "1.4.13",
3
+ "version": "1.4.14",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "npx eslint ./test.js"