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

CLI usage with npx (Windows) #13733

Closed
piotr-cz opened this issue Oct 2, 2020 · 2 comments
Closed

CLI usage with npx (Windows) #13733

piotr-cz opened this issue Oct 2, 2020 · 2 comments
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion bug ESLint is working incorrectly cli Relates to ESLint's command-line interface evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion

Comments

@piotr-cz
Copy link

piotr-cz commented Oct 2, 2020

Tell us about your environment

Windows 10

  • Node version: v14.13.0
  • npm version: v6.14.8
  • Local ESLint version: v7.10.0
  • Global ESLint version: Not found

What parser (default, @babel/eslint-parser, @typescript-eslint/parser, etc.) are you using?
default

Please show your full configuration:

Configuration
{
}

What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.

// Not related

Case A

npx eslint --rule "quotes: [2, double]" src

Case B

npx eslint -- --rule "quotes: [2, double]" src

This works:

node_modules\.bin\eslint --rule "quotes: [2, double]" src

What did you expect to happen?
Command should show report for each file in src directory, as in docs

What actually happened? Please include the actual, raw output from ESLint.

Case A

Oops! Something went wrong! :(

ESLint: 7.10.0

No files matching the pattern "[2," were found.
Please check for typing mistakes in the pattern.

Case B

Oops! Something went wrong! :(

ESLint: 7.10.0

No files matching the pattern "--rule" were found.
Please check for typing mistakes in the pattern.

Are you willing to submit a pull request to fix this bug?
no

@piotr-cz piotr-cz added bug ESLint is working incorrectly triage An ESLint team member will look at this issue soon labels Oct 2, 2020
@mdjermanovic mdjermanovic added cli Relates to ESLint's command-line interface evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion and removed triage An ESLint team member will look at this issue soon labels Oct 2, 2020
@mdjermanovic
Copy link
Member

Hi @piotr-cz, thanks for the issue!

This seems to be a bug in npx: npm/npx#43, npm/npx#10

It works without spaces in quotes:

npx eslint --rule "quotes:[2,double]" src

@piotr-cz
Copy link
Author

piotr-cz commented Oct 3, 2020

@mdjermanovic
Thank you for looking it up instead of me, it's clearly a npx issue.
Your workaround works 👍

@piotr-cz piotr-cz closed this as completed Oct 3, 2020
@eslint-github-bot eslint-github-bot bot locked and limited conversation to collaborators Apr 2, 2021
@eslint-github-bot eslint-github-bot bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Apr 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion bug ESLint is working incorrectly cli Relates to ESLint's command-line interface evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion
Projects
None yet
Development

No branches or pull requests

2 participants