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

fix: improve message for ignored files without a matching config #18404

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

fasttime
Copy link
Member

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 #18263

What changes did you make? (Give an overview)

Extended createIgnoreResult with an additional parameter that indicates whether a file has a matching configuration, in order to provide a better message when this is not the case. The value passed with this parameter is retrieved directly from ConfigArray, which got a new method isFileConfigured for this purpose. See the PR in config-array: humanwhocodes/config-array#138.

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

@eslint-github-bot eslint-github-bot bot added the bug ESLint is working incorrectly label Apr 29, 2024
@github-actions github-actions bot added cli Relates to ESLint's command-line interface core Relates to ESLint's core APIs and features labels Apr 29, 2024
Copy link

netlify bot commented Apr 29, 2024

Deploy Preview for docs-eslint canceled.

Name Link
🔨 Latest commit d15c087
🔍 Latest deploy log https://app.netlify.com/sites/docs-eslint/deploys/6631da5bf47fe00007847464

@@ -70,7 +70,7 @@
"@eslint-community/regexpp": "^4.6.1",
"@eslint/eslintrc": "^3.0.2",
"@eslint/js": "9.1.1",
"@humanwhocodes/config-array": "^0.13.0",
"@humanwhocodes/config-array": "github:humanwhocodes/config-array#pull/138/head",
Copy link
Member Author

@fasttime fasttime Apr 29, 2024

Choose a reason for hiding this comment

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

To be updated with a new version specifier.

message = "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.";
} else {
message = "File ignored because no matching configration was supplied.";
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
message = "File ignored because no matching configration was supplied.";
message = "File ignored because no matching configuration was supplied.";

Typo.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed in d15c087, thanks.

Copy link

Hi everyone, it looks like we lost track of this pull request. Please review and see what the next steps are. This pull request will auto-close in 7 days without an update.

@github-actions github-actions bot added the Stale label May 11, 2024
@fasttime
Copy link
Member Author

Still working on this.

@fasttime fasttime self-assigned this May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug ESLint is working incorrectly cli Relates to ESLint's command-line interface core Relates to ESLint's core APIs and features
Projects
Status: Implementing
Development

Successfully merging this pull request may close these issues.

Bug: Misleading message for non-configured files
2 participants