Skip to content

Conversation

@jaymarvelz
Copy link
Contributor

Prerequisites checklist

What is the purpose of this pull request?

This PR updates TypeScript types for suggestion objects so that the fix property is required.

This prevents creating suggestions without a fix, which would otherwise cause the runtime error:

TypeError: context.report() called with a suggest option without a fix function.

It also broadens the type of data from Record<string, string>Record<string, unknown> because ESLint message interpolation can accept any value that can be stringified.

What changes did you make? (Give an overview)

  • Made fix required in SuggestedEditBase.
  • Changed data type to Record<string, unknown> for compatibility with ESLint message interpolation.
  • Added tests for data to ensure various types are allowed.
  • Added @ts-expect-error in test where fix: null is used.

Related Issues

Is there anything you'd like reviewers to focus on?

@github-project-automation github-project-automation bot moved this to Needs Triage in Triage Oct 16, 2025
@eslint-github-bot eslint-github-bot bot added the bug Something isn't working label Oct 16, 2025
Copy link

@DMartens DMartens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes LGTM, thanks for spotting this.
Leaving this open for 2 days if someone else wants to take a look.

@nzakas nzakas moved this from Needs Triage to Second Review Needed in Triage Oct 17, 2025
Copy link
Member

@fasttime fasttime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@fasttime fasttime merged commit 02bac50 into eslint:main Oct 20, 2025
21 checks passed
@github-project-automation github-project-automation bot moved this from Second Review Needed to Complete in Triage Oct 20, 2025
@github-actions github-actions bot mentioned this pull request Oct 20, 2025
lumirlumir added a commit that referenced this pull request Oct 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accepted bug Something isn't working contributor pool

Projects

Status: Complete

Development

Successfully merging this pull request may close these issues.

3 participants