@blumintinc/eslint-plugin-blumint 1.20.47 → 1.20.48

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.47',
226
+ version: '1.20.48',
227
227
  },
228
228
  parseOptions: {
229
229
  ecmaVersion: 2020,
@@ -165,6 +165,19 @@ exports.enforcePropsNamingConsistency = (0, createRule_1.createRule)({
165
165
  }
166
166
  // Check function parameters
167
167
  function checkFunctionParams(node) {
168
+ // A constructor is a `MethodDefinition` wrapping a `FunctionExpression`,
169
+ // so both this visitor and `checkClassConstructor` would otherwise fire on
170
+ // the same parameter and emit two identical reports — each carrying a fix
171
+ // over the same range, which ESLint deduplicates by discarding one, so a
172
+ // single `--fix` pass could not converge (Issue #1514). The constructor
173
+ // handler owns the case because it is a strict superset: it also reports
174
+ // parameter properties, counts them toward the multi-Props deferral, and
175
+ // gates the rename on `this.<name>` safety.
176
+ if (node.type === utils_1.AST_NODE_TYPES.FunctionExpression &&
177
+ node.parent?.type === utils_1.AST_NODE_TYPES.MethodDefinition &&
178
+ node.parent.kind === 'constructor') {
179
+ return;
180
+ }
168
181
  // Skip functions with multiple parameters that have Props types
169
182
  const propsTypeParams = node.params.filter((param) => {
170
183
  if (param.type !== utils_1.AST_NODE_TYPES.Identifier)
@@ -505,7 +505,19 @@ exports.preferNullishCoalescingBooleanProps = (0, createRule_1.createRule)({
505
505
  },
506
506
  defaultOptions: [],
507
507
  create(context) {
508
- const parserServices = utils_1.ESLintUtils.getParserServices(context, true);
508
+ // getParserServices throws whenever the parser is not @typescript-eslint/parser
509
+ // (espree for .js, jsonc-eslint-parser for package.json). A throw here fails the
510
+ // entire lint run for that file, not just this rule, so mirror the same
511
+ // precondition it checks and degrade to the syntactic analysis instead. The
512
+ // `allowWithoutFullTypeInformation` flag only covers a TS parser lacking
513
+ // `parserOptions.project`; it does not cover a non-TS parser.
514
+ const services = context.parserServices;
515
+ const hasTypeServices = !!services?.program &&
516
+ !!services.esTreeNodeToTSNodeMap &&
517
+ !!services.tsNodeToESTreeNodeMap;
518
+ const parserServices = hasTypeServices
519
+ ? utils_1.ESLintUtils.getParserServices(context, true)
520
+ : undefined;
509
521
  const checker = parserServices?.program?.getTypeChecker();
510
522
  return {
511
523
  LogicalExpression(node) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blumintinc/eslint-plugin-blumint",
3
- "version": "1.20.47",
3
+ "version": "1.20.48",
4
4
  "description": "Custom eslint rules for use within BluMint",
5
5
  "author": {
6
6
  "name": "Brodie McGuire",
@@ -1,4 +1,26 @@
1
1
  [
2
+ {
3
+ "version": "1.20.48",
4
+ "date": "2026-07-31T09:14:53.303Z",
5
+ "rules": [
6
+ {
7
+ "name": "enforce-props-naming-consistency",
8
+ "changeType": "fix",
9
+ "issues": [
10
+ 1514
11
+ ],
12
+ "summary": "stop reporting constructor parameters twice (closes #1514)"
13
+ },
14
+ {
15
+ "name": "prefer-nullish-coalescing-boolean-props",
16
+ "changeType": "fix",
17
+ "issues": [
18
+ 1513
19
+ ],
20
+ "summary": "degrade instead of throwing under a non-TypeScript parser (closes #1513)"
21
+ }
22
+ ]
23
+ },
2
24
  {
3
25
  "version": "1.20.47",
4
26
  "date": "2026-07-31T08:38:59.580Z",