@blumintinc/eslint-plugin-blumint 1.20.186 → 1.20.187
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/lib/index.js
CHANGED
|
@@ -214,16 +214,15 @@ const containsJsxInObject = (node) => {
|
|
|
214
214
|
const containsJsxInSwitchStatement = (node) => {
|
|
215
215
|
for (const switchCase of node.cases) {
|
|
216
216
|
for (const statement of switchCase.consequent) {
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
}
|
|
217
|
+
// Braces on a `case` clause carry no meaning for this question, so the
|
|
218
|
+
// two spellings must agree. `case 1: { S }` reaches S through
|
|
219
|
+
// containsJsxInBlockStatement -> containsJsxInStatement; evaluating the
|
|
220
|
+
// identical predicate on an unbraced `case 1: S` is what makes the pair
|
|
221
|
+
// agree. Matching only ReturnStatement and BlockStatement here left a JSX
|
|
222
|
+
// return one level inside a try/catch/finally, a loop, a label or a
|
|
223
|
+
// nested switch invisible while its braced twin reported (#2206).
|
|
224
|
+
if (containsJsxInStatement(statement)) {
|
|
225
|
+
return true;
|
|
227
226
|
}
|
|
228
227
|
}
|
|
229
228
|
}
|
package/package.json
CHANGED
package/release-manifest.json
CHANGED
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"version": "1.20.187",
|
|
4
|
+
"date": "2026-08-28T10:18:26.589Z",
|
|
5
|
+
"rules": [
|
|
6
|
+
{
|
|
7
|
+
"name": "react-usememo-should-be-component",
|
|
8
|
+
"changeType": "fix",
|
|
9
|
+
"issues": [
|
|
10
|
+
2206
|
|
11
|
+
],
|
|
12
|
+
"summary": "read an unbraced case consequent through the same predicate as a braced one (closes #2206)"
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
},
|
|
2
16
|
{
|
|
3
17
|
"version": "1.20.186",
|
|
4
18
|
"date": "2026-08-28T09:27:29.922Z",
|