@blumintinc/eslint-plugin-blumint 1.20.112 → 1.20.113

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
@@ -223,7 +223,7 @@ function noFrontendImportsFromFunctionsPatterns(pattern) {
223
223
  module.exports = {
224
224
  meta: {
225
225
  name: '@blumintinc/eslint-plugin-blumint',
226
- version: '1.20.112',
226
+ version: '1.20.113',
227
227
  },
228
228
  parseOptions: {
229
229
  ecmaVersion: 2020,
@@ -5,5 +5,6 @@ declare const _default: import("@typescript-eslint/utils/dist/ts-eslint/Rule").R
5
5
  }[], {
6
6
  TSTypeAliasDeclaration(node: TSESTree.TSTypeAliasDeclaration): void;
7
7
  TSTypeReference(node: TSESTree.TSTypeReference): void;
8
+ 'Program:exit'(): void;
8
9
  }>;
9
10
  export default _default;
@@ -100,6 +100,13 @@ exports.default = (0, createRule_1.createRule)({
100
100
  break;
101
101
  }
102
102
  }
103
+ /**
104
+ * TypeScript hoists type aliases, so a request type may be declared below
105
+ * the function that consumes it. Collecting the wrapper references and
106
+ * resolving them once traversal is finished decouples the check from
107
+ * declaration order, which `typeAliasMap` alone cannot do.
108
+ */
109
+ const wrapperReferences = [];
103
110
  return {
104
111
  TSTypeAliasDeclaration(node) {
105
112
  typeAliasMap.set(node.id.name, node);
@@ -108,13 +115,25 @@ exports.default = (0, createRule_1.createRule)({
108
115
  const typeName = node.typeName.name;
109
116
  if (options.functionTypes.includes(typeName) &&
110
117
  node.typeParameters?.params[0]) {
111
- const typeParam = node.typeParameters.params[0];
118
+ wrapperReferences.push(node);
119
+ }
120
+ },
121
+ 'Program:exit'() {
122
+ for (const node of wrapperReferences) {
123
+ const typeParam = node.typeParameters?.params[0];
124
+ if (!typeParam)
125
+ continue;
112
126
  if (typeParam.type === utils_1.AST_NODE_TYPES.TSTypeReference) {
113
127
  const referencedTypeName = typeParam.typeName.name;
114
128
  const typeAlias = typeAliasMap.get(referencedTypeName);
115
- if (typeAlias) {
116
- checkTypeNode(typeAlias.typeAnnotation);
117
- }
129
+ /**
130
+ * A reference that names no local alias is still a type in its own
131
+ * right — `CallableRequest<Timestamp>` is the plainest form of the
132
+ * violation. Checking the node itself lets the non-serializable
133
+ * lookup and the generic descent apply; an unrecognized name simply
134
+ * yields no report, so an imported request type stays silent.
135
+ */
136
+ checkTypeNode(typeAlias ? typeAlias.typeAnnotation : typeParam);
118
137
  }
119
138
  else {
120
139
  checkTypeNode(typeParam);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blumintinc/eslint-plugin-blumint",
3
- "version": "1.20.112",
3
+ "version": "1.20.113",
4
4
  "description": "Custom eslint rules for use within BluMint",
5
5
  "author": {
6
6
  "name": "Brodie McGuire",
@@ -1,4 +1,18 @@
1
1
  [
2
+ {
3
+ "version": "1.20.113",
4
+ "date": "2026-08-05T17:37:08.020Z",
5
+ "rules": [
6
+ {
7
+ "name": "enforce-serializable-params",
8
+ "changeType": "fix",
9
+ "issues": [
10
+ 1750
11
+ ],
12
+ "summary": "report a non-JSON-safe type used directly as the request type parameter (closes #1750)"
13
+ }
14
+ ]
15
+ },
2
16
  {
3
17
  "version": "1.20.112",
4
18
  "date": "2026-08-05T16:17:08.283Z",