Skip to content

Conversation

@jaymarvelz
Copy link
Contributor

Prerequisites checklist

What is the purpose of this pull request? (put an "X" next to an item)

[ ] Documentation update
[x] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofix to a rule
[ ] Add a CLI option
[ ] Add something to the core
[ ] Other, please explain:

When a rule's suggestion is missing a fix function, the error message displayed [object Object] instead of showing the actual suggestion object contents.

What changes did you make? (Give an overview)

Updated the error message in validateSuggestions() to use JSON.stringify(suggestion, null, 2) instead of string interpolation.

Before:

TypeError: context.report() called with a suggest option without a fix function. See: [object Object]

After:

TypeError: context.report() called with a suggest option without a fix function. See: {
  "desc": "Some suggestion description",
}

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

@jaymarvelz jaymarvelz requested a review from a team as a code owner October 17, 2025 01:41
@github-project-automation github-project-automation bot moved this to Needs Triage in Triage Oct 17, 2025
@eslint-github-bot eslint-github-bot bot added the bug ESLint is working incorrectly label Oct 17, 2025
@netlify
Copy link

netlify bot commented Oct 17, 2025

Deploy Preview for docs-eslint ready!

Name Link
🔨 Latest commit fc4a315
🔍 Latest deploy log https://app.netlify.com/projects/docs-eslint/deploys/68f19ecd5ccfba00088c8e86
😎 Deploy Preview https://deploy-preview-20218--docs-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions bot added the core Relates to ESLint's core APIs and features label Oct 17, 2025
@jaymarvelz jaymarvelz marked this pull request as draft October 17, 2025 01:52
@DMartens
Copy link
Contributor

Thanks for spotting this, changes LGTM.
Is there any reason this PR is marked as a draft?

@DMartens DMartens moved this from Needs Triage to Triaging in Triage Oct 17, 2025
@jaymarvelz jaymarvelz marked this pull request as ready for review October 17, 2025 17:26
@mdjermanovic mdjermanovic added the accepted There is consensus among the team that this change meets the criteria for inclusion label Oct 18, 2025
Copy link
Member

@mdjermanovic mdjermanovic 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! Just waiting for the current release to conclude.

@mdjermanovic mdjermanovic moved this from Triaging to Merge Candidates in Triage Oct 18, 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 fb97cda into eslint:main Oct 20, 2025
30 checks passed
@github-project-automation github-project-automation bot moved this from Merge Candidates to Complete in Triage Oct 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accepted There is consensus among the team that this change meets the criteria for inclusion bug ESLint is working incorrectly core Relates to ESLint's core APIs and features

Projects

Status: Complete

Development

Successfully merging this pull request may close these issues.

4 participants