@blumintinc/eslint-plugin-blumint 1.19.10 → 1.19.11

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.10',
225
+ version: '1.19.11',
226
226
  },
227
227
  parseOptions: {
228
228
  ecmaVersion: 2020,
@@ -340,13 +340,34 @@ exports.default = (0, createRule_1.createRule)({
340
340
  fixer.replaceText(idNode, typeAnnotation ? `${newName}${typeText}` : newName),
341
341
  ];
342
342
  for (const ref of declaredVariable.references) {
343
+ const refId = ref.identifier;
343
344
  // The declaration write reference is the id node itself and
344
345
  // is already handled above. Skipping it also avoids emitting
345
346
  // overlapping fix ranges, which ESLint rejects.
346
- if (ref.identifier === idNode) {
347
+ if (refId === idNode) {
347
348
  continue;
348
349
  }
349
- fixes.push(fixer.replaceText(ref.identifier, newName));
350
+ const refParent = refId.parent;
351
+ // An object-literal shorthand `{ fooBar }` desugars to
352
+ // `{ fooBar: fooBar }`: the one token is both the property key
353
+ // and its value. Rewriting it to `{ FOO_BAR }` would rename
354
+ // the KEY too, silently changing the object's shape. Expand to
355
+ // `oldKey: NEW_NAME` so only the value is renamed.
356
+ if (refParent?.type === utils_1.AST_NODE_TYPES.Property &&
357
+ refParent.shorthand &&
358
+ refParent.parent?.type === utils_1.AST_NODE_TYPES.ObjectExpression) {
359
+ fixes.push(fixer.replaceText(refId, `${name}: ${newName}`));
360
+ continue;
361
+ }
362
+ // A re-export specifier `export { fooBar }` binds the public
363
+ // export name to this identifier. Renaming it would change the
364
+ // exported name — a cross-file contract a single-file fixer
365
+ // cannot safely rewrite (the declaration-level export guard
366
+ // above only catches inline `export const`). Decline the fix.
367
+ if (refParent?.type === utils_1.AST_NODE_TYPES.ExportSpecifier) {
368
+ return null;
369
+ }
370
+ fixes.push(fixer.replaceText(refId, newName));
350
371
  }
351
372
  return fixes;
352
373
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blumintinc/eslint-plugin-blumint",
3
- "version": "1.19.10",
3
+ "version": "1.19.11",
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.19.11",
4
+ "date": "2026-07-17T10:46:20.593Z",
5
+ "rules": [
6
+ {
7
+ "name": "global-const-style",
8
+ "changeType": "fix",
9
+ "issues": [
10
+ 1313
11
+ ],
12
+ "summary": "keep rename autofix reference-safe for shorthand props and re-exports (refs #1313)"
13
+ }
14
+ ]
15
+ },
2
16
  {
3
17
  "version": "1.19.10",
4
18
  "date": "2026-07-17T10:33:03.696Z",