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: No files matching the pattern "linebreak-style: [2, windows]" were found. #18476

Closed
1 task
ain opened this issue May 19, 2024 · 3 comments
Closed
1 task
Labels
bug ESLint is working incorrectly repro:needed

Comments

@ain
Copy link

ain commented May 19, 2024

Environment

Node version: 22.2.0
npm version: 10.7.0
Local ESLint version: 9.2.0
Global ESLint version: 9.2.0
Operating System: windows-2022, 20240514.3.0

What parser are you using?

Default (Espree)

What did you do?

As of Node.js v22, the linting task no more passes on GitHub Actions' Windows runner with the error of No files matching the pattern "linebreak-style: [2, windows]" were found. See also test results.

This does not occur on Node.js v21.

Full case can be inspected at ain/smartbanner.js#750

Configuration
module.exports = [
  {
    "rules": {
      "indent": [
        "error",
        2
      ],
      "linebreak-style": [
        "error",
        "unix"
      ],
      "quotes": [
        "error",
        "single"
      ],
      "semi": [
        "error",
        "always"
      ],
      "eqeqeq": [
        "error",
        "always"
      ],
      "no-multiple-empty-lines": [
        "error",
        {"max": 1}
      ]
    }
  }
];

What did you expect to happen?

Passing linting task similar to Node.js v21

What actually happened?

Run npm run eslint -- --rule 'linebreak-style: [2, windows]'

> smartbanner.js@1.24.1 eslint
> eslint src/*.js linebreak-style: [2, windows]


Oops! Something went wrong! :(

ESLint: 9.2.0

No files matching the pattern "linebreak-style: [2, windows]" were found.
Please check for typing mistakes in the pattern.

Error: Process completed with exit code 1.

See also test suite.

Link to Minimal Reproducible Example

ain/smartbanner.js#750

Participation

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

Additional comments

No response

@ain ain added bug ESLint is working incorrectly repro:needed labels May 19, 2024
@mdjermanovic
Copy link
Member

Hi @ain, thanks for the issue!

Can you please add the --debug flag, run again and share the output?

@aladdin-add
Copy link
Member

aladdin-add commented May 22, 2024

eslint src/*.js linebreak-style: [2, windows]

the command should be eslint src/*.js --rule linebreak-style: [2, windows]. seems you were not using eslint directly, it might be a bug in the tool, not eslint itself.

@mdjermanovic
Copy link
Member

eslint src/*.js linebreak-style: [2, windows]

the command should be eslint src/*.js --rule linebreak-style: [2, windows]. seems you were not using eslint directly, it might be a bug in the tool, not eslint itself.

Yes, I missed this line while reading the original post.

So, eslint's error message is correct given that the command to run eslint was eslint src/*.js linebreak-style: [2, windows]. The problem is that the --rule part of the command is lost somewhere in the process before running eslint.

This does not occur on Node.js v21.

I'd guess this is a problem with npm v10.7.0.

@mdjermanovic mdjermanovic closed this as not planned Won't fix, can't repro, duplicate, stale May 24, 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 repro:needed
Projects
Status: Complete
Development

No branches or pull requests

3 participants