Skip to content

Conversation

@ntnyq
Copy link
Contributor

@ntnyq ntnyq commented Oct 24, 2025

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:

Fixes #20240

What changes did you make? (Give an overview)

This PR adds a check to make it only reporting the removed formatter message when the error code equals to ERR_MODULE_NOT_FOUND.

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

Copilot AI review requested due to automatic review settings October 24, 2025 03:49
@ntnyq ntnyq requested a review from a team as a code owner October 24, 2025 03:49
@github-project-automation github-project-automation bot moved this to Needs Triage in Triage Oct 24, 2025
@netlify
Copy link

netlify bot commented Oct 24, 2025

Deploy Preview for docs-eslint canceled.

Name Link
🔨 Latest commit 3d06d33
🔍 Latest deploy log https://app.netlify.com/projects/docs-eslint/deploys/69383cb16047d40008846be1

@eslint-github-bot eslint-github-bot bot added the bug ESLint is working incorrectly label Oct 24, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a bug in the formatter loading logic by adding a stricter check for the removed formatters error message. Previously, the removed formatter message was shown for any error when the formatter name was in the removed list. Now, it only shows this message when the error code is specifically ERR_MODULE_NOT_FOUND, preventing incorrect error messages for other types of errors (like syntax errors in the formatter file).

@github-actions github-actions bot added cli Relates to ESLint's command-line interface core Relates to ESLint's core APIs and features labels Oct 24, 2025
@aladdin-add aladdin-add moved this from Needs Triage to Implementing in Triage Oct 24, 2025
@aladdin-add aladdin-add added the accepted There is consensus among the team that this change meets the criteria for inclusion label Oct 24, 2025
aladdin-add
aladdin-add previously approved these changes Oct 24, 2025
Copy link
Member

@aladdin-add aladdin-add left a comment

Choose a reason for hiding this comment

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

There is also this check in cli-engine, but it is about to be removed, so there is no need to change it.

LGTM, thanks! Would like another review before merging.

@aladdin-add aladdin-add moved this from Implementing to Second Review Needed in Triage Oct 24, 2025
@mdjermanovic
Copy link
Member

The original issue is already assigned to @githrdw. Per our policies, we should wait for the assignee to submit a PR.

https://eslint.org/docs/latest/contribute/work-on-issue#starting-work

@ntnyq
Copy link
Contributor Author

ntnyq commented Oct 28, 2025

The original issue is already assigned to @githrdw. Per our policies, we should wait for the assignee to submit a PR.

eslint.org/docs/latest/contribute/work-on-issue#starting-work

Sorry, I didn't notice that the issue has been assigned to the poster.

Should we keep this PR open and wait for the issue poster or should I close this immediately?

@lumirlumir
Copy link
Member

@ntnyq I've left a comment on #20240 (comment).

Let's wait a bit for the original authors to reply :)

@lumirlumir
Copy link
Member

lumirlumir commented Nov 13, 2025

It seems there hasn't been a reply from the original author in over two weeks.

I am wondering what's the policy here. Should we proceed with this one, or wait a bit longer?

@githrdw
Copy link

githrdw commented Nov 13, 2025

Sorry, I was not aware that I assigned myself to the issue and I cannot remove myself from it :(
Your PR looks good so if someone can approve it, that would be nice

@snitin315
Copy link
Contributor

@ntnyq Are you still working on this issue? If yes, can you implement this suggestion #20241 (comment)

@mdjermanovic
Copy link
Member

mdjermanovic commented Dec 5, 2025

@ntnyq you can continue working on this PR, but in the future please follow our contributor guidelines and claim the issue first.

@mdjermanovic mdjermanovic moved this from Second Review Needed to Implementing in Triage Dec 5, 2025
@ntnyq ntnyq force-pushed the fix/load-formatter branch 2 times, most recently from 892e7fd to 1b45510 Compare December 7, 2025 13:15
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.

Just a reminder that #20241 (comment) hasn't been addressed yet.

@ntnyq
Copy link
Contributor Author

ntnyq commented Dec 7, 2025

@ntnyq you can continue working on this PR, but in the future please follow our contributor guidelines and claim the issue first.

Thanks for your advice.

I was working over the weekend and just resolved the feedback.

@ntnyq ntnyq requested a review from mdjermanovic December 8, 2025 10:30
@ntnyq
Copy link
Contributor Author

ntnyq commented Dec 9, 2025

CI failed for knip check, #20389 is fixing it.

@ntnyq ntnyq force-pushed the fix/load-formatter branch from 7d74bb7 to 5fffde9 Compare December 9, 2025 08:01
@ntnyq ntnyq force-pushed the fix/load-formatter branch from 5fffde9 to fa2f9f7 Compare December 9, 2025 11:09
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!

@mdjermanovic mdjermanovic merged commit 53e9522 into eslint:main Dec 9, 2025
31 checks passed
@github-project-automation github-project-automation bot moved this from Implementing to Complete in Triage Dec 9, 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 cli Relates to ESLint's command-line interface contributor pool core Relates to ESLint's core APIs and features

Projects

Status: Complete

Development

Successfully merging this pull request may close these issues.

Bug: ESLint hides underlying formatter errors (misleading message)

6 participants