Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Misleading message for non-configured files #18263

Open
1 task done
mdjermanovic opened this issue Apr 4, 2024 · 2 comments · May be fixed by #18404
Open
1 task done

Bug: Misleading message for non-configured files #18263

mdjermanovic opened this issue Apr 4, 2024 · 2 comments · May be fixed by #18404
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion bug ESLint is working incorrectly repro:yes

Comments

@mdjermanovic
Copy link
Member

Environment

Node version: v20.12.0
npm version: v10.5.0
Local ESLint version: v9.0.0-rc.0
Global ESLint version: no
Operating System: windows

What parser are you using?

Default (Espree)

What did you do?

Configuration
module.exports = [];
// index.ts

Command:

eslint index.ts

What did you expect to happen?

This file doesn't have a matching configuration, so I'd expect a message describing that.

What actually happened?

  0:0  warning  File ignored because of a matching ignore pattern. Use "--no-ignore" to disable file ignore settings or use "--no-warn-ignored" to suppress this warning

This message is misleading since the file is not ignored "because of a matching ignore pattern". Also, using "--no-ignore" wouldn't help.

Link to Minimal Reproducible Example

https://stackblitz.com/edit/stackblitz-starters-zxcj6m

Participation

  • I am willing to submit a pull request for this issue.

Additional comments

No response

@mdjermanovic mdjermanovic added bug ESLint is working incorrectly repro:needed labels Apr 4, 2024
@mdjermanovic mdjermanovic changed the title Bug: (fill in) Bug: Misleading message for non-configured files Apr 4, 2024
@nzakas nzakas added accepted There is consensus among the team that this change meets the criteria for inclusion repro:yes and removed repro:needed labels Apr 5, 2024
@nzakas
Copy link
Member

nzakas commented Apr 5, 2024

I agree. We should have a better error message.

@fasttime
Copy link
Member

I've prepared a PR to show how to improve the error message in the specific case that a file is missing a matching configuration, it's marked as a draft because it requires updating config-array first: #18404.

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 repro:yes
Projects
Status: Ready to Implement
Development

Successfully merging a pull request may close this issue.

3 participants