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

glob pattern not working? #402

Closed
mehl321 opened this issue Feb 5, 2016 · 2 comments

Comments

@mehl321
Copy link

commented Feb 5, 2016

I put this command in my package.json file: "lint": "standard src/**/*.js*" and when I run it the errors contained in my src subfolders are found but not those contained in the root of src.

How can I make this work everywhere?

@feross

This comment has been minimized.

Copy link
Member

commented Feb 5, 2016

This is because your shell (bash, zsh, etc.) is expanding the double star ** differently than how standard does it (using the glob npm package).

This shell expansion is happening automatically before standard gets invoked.

You can pass through the string unmodified by your shell if you do this:

"lint": "standard 'src/**/*.js*'"

(note the quotes around the glob)

Cheers!

@feross feross closed this Feb 5, 2016

@feross feross added the question label Feb 5, 2016

@mehl321

This comment has been minimized.

Copy link
Author

commented Feb 5, 2016

Fantastic! I didn't know this trick.

@lock lock bot locked as resolved and limited conversation to collaborators May 10, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
2 participants
You can’t perform that action at this time.