@blumintinc/eslint-plugin-blumint 1.15.0 → 1.16.0

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.
Files changed (37) hide show
  1. package/README.md +28 -5
  2. package/lib/index.js +7 -1
  3. package/lib/rules/consistent-callback-naming.js +26 -0
  4. package/lib/rules/dynamic-https-errors.js +5 -26
  5. package/lib/rules/enforce-boolean-naming-prefixes.d.ts +1 -0
  6. package/lib/rules/enforce-boolean-naming-prefixes.js +86 -119
  7. package/lib/rules/enforce-dynamic-imports.d.ts +2 -1
  8. package/lib/rules/enforce-dynamic-imports.js +42 -21
  9. package/lib/rules/enforce-memoize-async.js +1 -4
  10. package/lib/rules/enforce-mui-rounded-icons.js +42 -1
  11. package/lib/rules/enforce-verb-noun-naming.js +3 -0
  12. package/lib/rules/global-const-style.js +9 -0
  13. package/lib/rules/logical-top-to-bottom-grouping.js +80 -2
  14. package/lib/rules/memo-compare-deeply-complex-props.js +167 -3
  15. package/lib/rules/memo-nested-react-components.js +143 -8
  16. package/lib/rules/no-array-length-in-deps.js +74 -3
  17. package/lib/rules/no-circular-references.js +145 -482
  18. package/lib/rules/no-compositing-layer-props.js +31 -0
  19. package/lib/rules/no-entire-object-hook-deps.js +132 -97
  20. package/lib/rules/no-explicit-return-type.js +6 -0
  21. package/lib/rules/no-hungarian.js +119 -24
  22. package/lib/rules/no-margin-properties.js +7 -38
  23. package/lib/rules/no-unnecessary-verb-suffix.js +79 -0
  24. package/lib/rules/no-unused-props.js +215 -37
  25. package/lib/rules/no-useless-fragment.js +10 -2
  26. package/lib/rules/parallelize-async-operations.js +1 -3
  27. package/lib/rules/prefer-type-alias-over-typeof-constant.js +73 -11
  28. package/lib/rules/prefer-use-deep-compare-memo.js +8 -14
  29. package/lib/rules/react-memoize-literals.js +87 -1
  30. package/lib/rules/require-migration-script-metadata.d.ts +9 -0
  31. package/lib/rules/require-migration-script-metadata.js +206 -0
  32. package/lib/rules/warn-https-error-message-user-friendly.d.ts +1 -0
  33. package/lib/rules/warn-https-error-message-user-friendly.js +239 -0
  34. package/lib/utils/ASTHelpers.d.ts +15 -0
  35. package/lib/utils/ASTHelpers.js +48 -0
  36. package/package.json +7 -6
  37. package/release-manifest.json +166 -0
@@ -613,6 +613,54 @@ class ASTHelpers {
613
613
  }
614
614
  return fn(node);
615
615
  }
616
+ /**
617
+ * Checks if a call expression or new expression is a call to HttpsError.
618
+ * Handles both 'HttpsError' and 'https.HttpsError'.
619
+ */
620
+ static isHttpsErrorCall(callee) {
621
+ if (callee.type === utils_1.AST_NODE_TYPES.MemberExpression) {
622
+ return (callee.object.type === utils_1.AST_NODE_TYPES.Identifier &&
623
+ callee.object.name === 'https' &&
624
+ callee.property.type === utils_1.AST_NODE_TYPES.Identifier &&
625
+ callee.property.name === 'HttpsError');
626
+ }
627
+ else if (callee.type === utils_1.AST_NODE_TYPES.Identifier) {
628
+ return callee.name === 'HttpsError';
629
+ }
630
+ return false;
631
+ }
632
+ /**
633
+ * Checks if a call expression is a call to toHttpsError.
634
+ * Handles both 'toHttpsError' and 'https.toHttpsError'.
635
+ */
636
+ static isToHttpsErrorCall(callee) {
637
+ if (callee.type === utils_1.AST_NODE_TYPES.MemberExpression) {
638
+ return (callee.object.type === utils_1.AST_NODE_TYPES.Identifier &&
639
+ callee.object.name === 'https' &&
640
+ callee.property.type === utils_1.AST_NODE_TYPES.Identifier &&
641
+ callee.property.name === 'toHttpsError');
642
+ }
643
+ else if (callee.type === utils_1.AST_NODE_TYPES.Identifier) {
644
+ return callee.name === 'toHttpsError';
645
+ }
646
+ return false;
647
+ }
648
+ /**
649
+ * Unwraps TypeScript-specific nodes (assertions, non-null, satisfies) and
650
+ * parenthesized expressions to get to the underlying expression.
651
+ */
652
+ static unwrapTSAssertions(node) {
653
+ let inner = node;
654
+ while (inner &&
655
+ (inner.type === utils_1.AST_NODE_TYPES.TSAsExpression ||
656
+ inner.type === utils_1.AST_NODE_TYPES.TSSatisfiesExpression ||
657
+ inner.type === utils_1.AST_NODE_TYPES.TSNonNullExpression ||
658
+ inner.type === utils_1.AST_NODE_TYPES.TSTypeAssertion ||
659
+ inner.type === 'ParenthesizedExpression')) {
660
+ inner = inner.expression;
661
+ }
662
+ return inner;
663
+ }
616
664
  /**
617
665
  * Helper to get ancestors of a node in a way that is compatible with both ESLint v8 and v9.
618
666
  * In ESLint v9, context.getAncestors() is deprecated and moved to context.sourceCode.getAncestors(node).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blumintinc/eslint-plugin-blumint",
3
- "version": "1.15.0",
3
+ "version": "1.16.0",
4
4
  "description": "Custom eslint rules for use within BluMint",
5
5
  "author": {
6
6
  "name": "Brodie McGuire",
@@ -27,7 +27,7 @@
27
27
  "private": false,
28
28
  "scripts": {
29
29
  "lint": "npm-run-all \"lint:*\"",
30
- "lint:eslint-docs": "npm-run-all \"update:eslint-docs -- --check\"",
30
+ "lint:eslint-docs": "eslint-doc-generator --check",
31
31
  "lint:js": "eslint ./src",
32
32
  "lint:fix": "tsc && eslint \"./src/**/*\" --quiet --fix",
33
33
  "test": "jest --passWithNoTests --reporters=default --reporters=jest-junit",
@@ -36,6 +36,7 @@
36
36
  "address-merge-conflicts": "tsx ./.github/scripts/address-merge-conflicts.ts",
37
37
  "check-merge-conflicts": "bash ./scripts/check-merge-conflicts.sh",
38
38
  "merge-review": "tsx ./.github/scripts/merge-review.ts",
39
+ "pr-autopilot": "tsx ./.github/scripts/pr-autopilot.ts",
39
40
  "fetch-unresolved-comments": "./scripts/pr-check-comments.sh",
40
41
  "fetch-unresolved-bot-comments": "./scripts/pr-check-bot-comments.sh",
41
42
  "resolve-comments": "./scripts/pr-resolve-comments.sh",
@@ -69,22 +70,22 @@
69
70
  "@semantic-release/release-notes-generator": "14.1.0",
70
71
  "@types/eslint": "8.37.0",
71
72
  "@types/jest": "29.5.14",
72
- "@types/node": "18.7.13",
73
+ "@types/node": "22.20.0",
73
74
  "@typescript-eslint/eslint-plugin": "5.34.0",
74
75
  "@typescript-eslint/parser": "5.48.0",
75
76
  "@typescript-eslint/utils": "5.59.6",
76
- "chai": "4.3.6",
77
+ "chai": "4.5.0",
77
78
  "chai-as-promised": "7.1.1",
78
79
  "cross-env": "7.0.3",
79
80
  "cz-conventional-changelog": "3.3.0",
80
81
  "del-cli": "4.0.1",
81
82
  "dotenv-cli": "5.0.0",
82
83
  "eslint": "8.57.1",
83
- "eslint-config-prettier": "8.5.0",
84
+ "eslint-config-prettier": "9.1.2",
84
85
  "eslint-doc-generator": "2.2.0",
85
86
  "eslint-import-resolver-typescript": "3.5.5",
86
87
  "eslint-plugin-eslint-plugin": "5.0.0",
87
- "eslint-plugin-import": "2.26.0",
88
+ "eslint-plugin-import": "2.32.0",
88
89
  "eslint-plugin-jsdoc": "44.0.0",
89
90
  "eslint-plugin-node": "11.1.0",
90
91
  "eslint-plugin-prettier": "4.2.1",
@@ -0,0 +1,166 @@
1
+ [
2
+ {
3
+ "version": "1.16.0",
4
+ "date": "2026-06-29T19:34:27.787Z",
5
+ "rules": [
6
+ {
7
+ "name": "consistent-callback-naming",
8
+ "changeType": "fix",
9
+ "issues": [
10
+ 1182
11
+ ],
12
+ "summary": "skip union props with non-function members (closes #1182)"
13
+ },
14
+ {
15
+ "name": "enforce-boolean-naming-prefixes",
16
+ "changeType": "fix",
17
+ "issues": [
18
+ 1219
19
+ ],
20
+ "summary": "make property-signature checks opt-in (closes #1219)"
21
+ },
22
+ {
23
+ "name": "enforce-mui-rounded-icons",
24
+ "changeType": "fix",
25
+ "issues": [
26
+ 1218
27
+ ],
28
+ "summary": "strip variant suffix in fix and skip brand icons (closes #1218)"
29
+ },
30
+ {
31
+ "name": "enforce-verb-noun-naming",
32
+ "changeType": "fix",
33
+ "issues": [
34
+ 1177,
35
+ 1225
36
+ ],
37
+ "summary": "add 'bucket'/'bucketize' to verbs allowlist (closes #1225); allow `main` as a function name (closes #1177)"
38
+ },
39
+ {
40
+ "name": "global-const-style",
41
+ "changeType": "fix",
42
+ "issues": [
43
+ 1186
44
+ ],
45
+ "summary": "stop flagging null and boolean literals for `as const` (closes #1186)"
46
+ },
47
+ {
48
+ "name": "logical-top-to-bottom-grouping",
49
+ "changeType": "fix",
50
+ "issues": [
51
+ 1191
52
+ ],
53
+ "summary": "keep sibling destructures from the same source declarator grouped (closes #1191)"
54
+ },
55
+ {
56
+ "name": "memo-compare-deeply-complex-props",
57
+ "changeType": "fix",
58
+ "issues": [
59
+ 1179,
60
+ 1224
61
+ ],
62
+ "summary": "skip reserved React ref/key slots (closes #1224); exclude React render types from complex-prop detection"
63
+ },
64
+ {
65
+ "name": "memo-nested-react-components",
66
+ "changeType": "fix",
67
+ "issues": [
68
+ 1185
69
+ ],
70
+ "summary": "skip HOC factories and render-prop callbacks (closes #1185)"
71
+ },
72
+ {
73
+ "name": "no-array-length-in-deps",
74
+ "changeType": "fix",
75
+ "issues": [
76
+ 1196
77
+ ],
78
+ "summary": "allow array.length in deps when the body uses only .length (closes #1196)"
79
+ },
80
+ {
81
+ "name": "no-circular-references",
82
+ "changeType": "fix",
83
+ "issues": [],
84
+ "summary": "fix recursive member resolution and use cross-version scope helper; fix false positive for function parameters"
85
+ },
86
+ {
87
+ "name": "no-compositing-layer-props",
88
+ "changeType": "fix",
89
+ "issues": [
90
+ 1228
91
+ ],
92
+ "summary": "don't flag CSS reset/identity values (closes #1228)"
93
+ },
94
+ {
95
+ "name": "no-entire-object-hook-deps",
96
+ "changeType": "fix",
97
+ "issues": [
98
+ 1176
99
+ ],
100
+ "summary": "lock in shorthand/JSX usage detection for as-const memo returns (closes #1176); correctly handle TS assertions and optional chaining in parent traversal; resolve PR review comments on TS assertion handling in object literals"
101
+ },
102
+ {
103
+ "name": "no-explicit-return-type",
104
+ "changeType": "fix",
105
+ "issues": [
106
+ 1216
107
+ ],
108
+ "summary": "exempt explicit `never` return types (closes #1216)"
109
+ },
110
+ {
111
+ "name": "no-hungarian",
112
+ "changeType": "fix",
113
+ "issues": [
114
+ 1217
115
+ ],
116
+ "summary": "exempt generic type parameters and semantic type-concept names (closes #1217)"
117
+ },
118
+ {
119
+ "name": "no-margin-properties",
120
+ "changeType": "fix",
121
+ "issues": [
122
+ 1214
123
+ ],
124
+ "summary": "don't flag margins inside createTheme() overrides (closes #1214)"
125
+ },
126
+ {
127
+ "name": "no-unnecessary-verb-suffix",
128
+ "changeType": "fix",
129
+ "issues": [
130
+ 1227
131
+ ],
132
+ "summary": "exempt phrasal-verb particle endings (closes #1227)"
133
+ },
134
+ {
135
+ "name": "no-unused-props",
136
+ "changeType": "fix",
137
+ "issues": [
138
+ 1215
139
+ ],
140
+ "summary": "track props through generic wrappers and body destructuring (closes #1215)"
141
+ },
142
+ {
143
+ "name": "no-useless-fragment",
144
+ "changeType": "fix",
145
+ "issues": [
146
+ 1195
147
+ ],
148
+ "summary": "keep fragments wrapping a single expression container (closes #1195)"
149
+ },
150
+ {
151
+ "name": "react-memoize-literals",
152
+ "changeType": "fix",
153
+ "issues": [
154
+ 1169
155
+ ],
156
+ "summary": "extend sx/style exemption to conditional, logical, and array values (refs #1169); exempt inline sx/style JSX attribute literals (closes #1169)"
157
+ },
158
+ {
159
+ "name": "require-migration-script-metadata",
160
+ "changeType": "fix",
161
+ "issues": [],
162
+ "summary": "fix @migrationDependencies logic and update filename access for ESLint v9 compatibility; address review comments on JSDoc tag parsing and validation"
163
+ }
164
+ ]
165
+ }
166
+ ]