@houheaven/eslint-config-helper 2.1.1 → 2.1.4

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.
@@ -53,6 +53,20 @@ const EslintRules = {
53
53
  ...require("../rules/vue/vue3-strongly-recommended.js").rules,
54
54
  ...require("../rules/vue/vue3-uncategorized.js").rules,
55
55
  },
56
+ react: {
57
+ // ...require("../rules/react/_deprecated.js").rules,
58
+ ...require("../rules/react/fixable.js").rules,
59
+ ...require("../rules/react/suggestion.js").rules,
60
+ ...require("../rules/react/jsx.js").rules,
61
+ ...require("../rules/react/class-component.js").rules,
62
+ ...require("../rules/react/prop-types.js").rules,
63
+ ...require("../rules/react/dom.js").rules,
64
+ },
65
+ reactHooks: {
66
+ // ...require("../rules/react-hooks/_deprecated.js").rules,
67
+ ...require("../rules/react-hooks/fixable.js").rules,
68
+ ...require("../rules/react-hooks/other.js").rules,
69
+ },
56
70
  };
57
71
 
58
72
 
@@ -73,6 +87,10 @@ function getRules(rules) {
73
87
  ...EslintRules.vue,
74
88
  ...EslintRules.vue2,
75
89
  ...EslintRules.vue3,
90
+ // react 规则
91
+ ...EslintRules.react,
92
+ // react-hooks 规则
93
+ ...EslintRules.reactHooks,
76
94
  };
77
95
  const ValidRules = {};
78
96
  const InvalidRules = {};
@@ -138,6 +156,16 @@ function getWarnRules(type) {
138
156
  ...EslintRules.vue3,
139
157
  };
140
158
  break;
159
+ case "react":
160
+ rules = {
161
+ ...EslintRules.react,
162
+ };
163
+ break;
164
+ case "react-hooks":
165
+ rules = {
166
+ ...EslintRules.reactHooks,
167
+ };
168
+ break;
141
169
  }
142
170
 
143
171
  // 筛选规则
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@houheaven/eslint-config-helper",
3
- "version": "2.1.1",
3
+ "version": "2.1.4",
4
4
  "description": "Eslint 规则助手",
5
5
  "author": "立树",
6
6
  "license": "MIT",
@@ -40,12 +40,12 @@
40
40
  },
41
41
  "repository": {
42
42
  "type": "git",
43
- "url": "https://gitee.com/houheaven/eslint-config-helper.git"
43
+ "url": "https://github.com/houheaven/eslint-config-helper.git"
44
44
  },
45
45
  "bugs": {
46
- "url": "https://gitee.com/houheaven/eslint-config-helper/issues"
46
+ "url": "https://github.com/houheaven/eslint-config-helper/issues"
47
47
  },
48
- "homepage": "https://gitee.com/houheaven/eslint-config-helper",
48
+ "homepage": "https://github.com/houheaven/eslint-config-helper",
49
49
  "scripts": {
50
50
  "lint": "eslint ."
51
51
  },