@blumintinc/eslint-plugin-blumint 1.19.3 → 1.19.5

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
@@ -222,7 +222,7 @@ function noFrontendImportsFromFunctionsPatterns(pattern) {
222
222
  module.exports = {
223
223
  meta: {
224
224
  name: '@blumintinc/eslint-plugin-blumint',
225
- version: '1.19.3',
225
+ version: '1.19.5',
226
226
  },
227
227
  parseOptions: {
228
228
  ecmaVersion: 2020,
@@ -102,7 +102,14 @@ exports.noRedundantThisParams = (0, createRule_1.createRule)({
102
102
  for (const member of node.body.body) {
103
103
  if (member.type === utils_1.AST_NODE_TYPES.MethodDefinition ||
104
104
  member.type === utils_1.AST_NODE_TYPES.TSAbstractMethodDefinition) {
105
- if (member.kind === 'constructor') {
105
+ // Only genuine methods (`kind: 'method'`) are invoked directly as
106
+ // `this.x(args)`. A `get`/`set` accessor is also a MethodDefinition,
107
+ // but `this.accessor(args)` evaluates the accessor with zero arguments
108
+ // and then calls its RETURN VALUE — so when that value is an
109
+ // externally-supplied function it legitimately needs instance state
110
+ // threaded in, and flagging it is a false positive (issue #1308). The
111
+ // constructor is likewise never called as `this.constructor(...)`.
112
+ if (member.kind !== 'method') {
106
113
  continue;
107
114
  }
108
115
  const methodName = getNameFromPropertyName(member.key);
@@ -46,6 +46,18 @@ const DEFAULT_EXCLUDED_COMPONENTS = new Set([
46
46
  'React.StrictMode',
47
47
  ]);
48
48
  const DEFAULT_TARGET_PATHS = ['src/components/**/*.tsx'];
49
+ /**
50
+ * Icon components (e.g. CheckIcon, RefreshIcon from @mui/icons-material) are
51
+ * decorative leaf elements — the same category as the layout/decorative
52
+ * primitives in DEFAULT_EXCLUDED_COMPONENTS. They expose no composable
53
+ * customization surface a parent should re-expose, so rendering one is never a
54
+ * composition dependency. Matched by the conventional `*Icon` suffix, which
55
+ * excludes CheckIcon/LinkIcon/RefreshIcon without touching interactive
56
+ * components like IconButton (issue #1307).
57
+ */
58
+ function isDecorativeIcon(name) {
59
+ return /Icon$/.test(name);
60
+ }
49
61
  /**
50
62
  * Derives the expected Props type name for a JSX element name.
51
63
  * e.g. "LoadingButton" → "LoadingButtonProps"
@@ -432,7 +444,9 @@ exports.requirePropsComposition = (0, createRule_1.createRule)({
432
444
  const body = funcNode.body ?? funcNode;
433
445
  const allJsxNames = collectJsxElementNames(body);
434
446
  // Filter to non-excluded custom components
435
- const depComponents = Array.from(allJsxNames).filter((name) => !excludeComponents.has(name) && name !== componentName);
447
+ const depComponents = Array.from(allJsxNames).filter((name) => !excludeComponents.has(name) &&
448
+ !isDecorativeIcon(name) &&
449
+ name !== componentName);
436
450
  if (depComponents.length < minDependencyCount) {
437
451
  return;
438
452
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blumintinc/eslint-plugin-blumint",
3
- "version": "1.19.3",
3
+ "version": "1.19.5",
4
4
  "description": "Custom eslint rules for use within BluMint",
5
5
  "author": {
6
6
  "name": "Brodie McGuire",
@@ -1,4 +1,32 @@
1
1
  [
2
+ {
3
+ "version": "1.19.5",
4
+ "date": "2026-07-15T15:24:16.132Z",
5
+ "rules": [
6
+ {
7
+ "name": "no-redundant-this-params",
8
+ "changeType": "fix",
9
+ "issues": [
10
+ 1308
11
+ ],
12
+ "summary": "skip get/set accessors when resolving callees (closes #1308)"
13
+ }
14
+ ]
15
+ },
16
+ {
17
+ "version": "1.19.4",
18
+ "date": "2026-07-14T18:24:36.895Z",
19
+ "rules": [
20
+ {
21
+ "name": "require-props-composition",
22
+ "changeType": "fix",
23
+ "issues": [
24
+ 1307
25
+ ],
26
+ "summary": "exclude decorative *Icon leaf components (closes #1307)"
27
+ }
28
+ ]
29
+ },
2
30
  {
3
31
  "version": "1.19.3",
4
32
  "date": "2026-07-14T11:28:07.708Z",