Skip to content

Bug: [new config system] unmatched individual patterns are not reported #16275

@mdjermanovic

Description

@mdjermanovic

Environment

Node version: v16.14.0
npm version: v8.3.1
Local ESLint version: v8.23.0 (Currently used)
Global ESLint version: Not found
Operating System: win32 10.0.19044

What parser are you using?

Default (Espree)

What did you do?

I ran the following command in my local clone of the eslint/eslint repo, main branch:

node ./bin/eslint.js "tools/*.js" "doesnotexist/*.js" -f tap

What did you expect to happen?

Since there is no doesnotexist directory, I would expect an error saying that the doesnotexist/*.js pattern is unmatched:

Oops! Something went wrong! :(

ESLint: 8.23.0

No files matching the pattern "doesnotexist/*.js" were found.
Please check for typing mistakes in the pattern.

This is the current behavior in eslintrc mode (when eslint.config.js file is deleted).

What actually happened?

Successful linting:

TAP version 13
1..7
ok 1 - D:\projects\eslint\tools\code-sample-minimizer.js
ok 2 - D:\projects\eslint\tools\config-rule.js
ok 3 - D:\projects\eslint\tools\eslint-fuzzer.js
ok 4 - D:\projects\eslint\tools\fetch-docs-links.js
ok 5 - D:\projects\eslint\tools\fuzzer-runner.js
ok 6 - D:\projects\eslint\tools\update-readme.js
ok 7 - D:\projects\eslint\tools\update-rule-types.js

Participation

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

Additional comments

This happens because we're passing to globby all the patterns together, so we don't know if some of them didn't match anything.

Metadata

Metadata

Assignees

Labels

acceptedThere is consensus among the team that this change meets the criteria for inclusionarchived due to ageThis issue has been archived; please open a new issue for any further discussionbugESLint is working incorrectlyrepro:yesIssues with a reproducible example

Type

No type

Projects

Status

Complete

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions