Skip to content

eslint-factory: no-unsafe-catch-error-property — add suggestions for stack/code and cover computed access #42190

Description

@github-actions

Summary

Diagnostic quality gaps in no-unsafe-catch-error-property: only .message gets a suggestion fix (eslint-factory/src/rules/no-unsafe-catch-error-property.ts:55-66); .stack/.code report with no actionable fix. Computed access err["message"] is an intentional false negative but is trivially equivalent to the flagged form.

Acceptance criteria

  • Provide guard-wrapping suggestions for .stack/.code (e.g. wrap site in err instanceof Error ? ... : ...).
  • Flag computed string-literal access err["message"] same as err.message; keep dynamic err[prop] out of scope.
  • Tests covering computed-literal access and the new suggestions.
  • Message text points to getErrorMessage from error_helpers.cjs consistently.

Generated by 🤖 ESLint Refiner · 156.2 AIC · ⌖ 11 AIC · ⊞ 4.7K ·

  • expires on Jul 5, 2026, 10:55 PM UTC-08:00

Metadata

Metadata

Labels

cookieIssue Monster Loves Cookies!eslint

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions