@blumintinc/eslint-plugin-blumint 1.18.14 → 1.18.15
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 +1 -1
- package/lib/rules/react-memoize-literals.js +9 -2
- package/package.json +1 -1
- package/release-manifest.json +14 -0
package/lib/index.js
CHANGED
|
@@ -100,11 +100,18 @@ function isHookName(name) {
|
|
|
100
100
|
}
|
|
101
101
|
/**
|
|
102
102
|
* Detects PascalCase identifiers commonly used for React components.
|
|
103
|
+
*
|
|
104
|
+
* SCREAMING_SNAKE_CASE names (`CHANNEL_OPTIONS`, `MAX_COUNT`, `SPACING`) are
|
|
105
|
+
* constants by convention, not components, so they are excluded even though
|
|
106
|
+
* they begin with an uppercase letter. Treating them as components would
|
|
107
|
+
* misclassify a module-scope constant's `.map`/`.filter` callback body as a
|
|
108
|
+
* render body and flag literals that are only ever built once at import.
|
|
103
109
|
* @param name Candidate identifier name.
|
|
104
|
-
* @returns True when the name
|
|
110
|
+
* @returns True when the name is PascalCase (starts uppercase and contains a
|
|
111
|
+
* lowercase letter), false for all-caps constants.
|
|
105
112
|
*/
|
|
106
113
|
function isComponentName(name) {
|
|
107
|
-
return !!name && /^[A-Z]/.test(name);
|
|
114
|
+
return !!name && /^[A-Z]/.test(name) && !/^[A-Z][A-Z0-9_]*$/.test(name);
|
|
108
115
|
}
|
|
109
116
|
/**
|
|
110
117
|
* True when `node` is a function literal passed directly as an argument to an
|
package/package.json
CHANGED
package/release-manifest.json
CHANGED
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"version": "1.18.15",
|
|
4
|
+
"date": "2026-07-13T15:25:03.959Z",
|
|
5
|
+
"rules": [
|
|
6
|
+
{
|
|
7
|
+
"name": "react-memoize-literals",
|
|
8
|
+
"changeType": "fix",
|
|
9
|
+
"issues": [
|
|
10
|
+
1292
|
|
11
|
+
],
|
|
12
|
+
"summary": "exclude SCREAMING_SNAKE_CASE constants from component detection (closes #1292)"
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
},
|
|
2
16
|
{
|
|
3
17
|
"version": "1.18.14",
|
|
4
18
|
"date": "2026-07-13T08:30:23.444Z",
|