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

improve glob support #1117

Closed
zaynv opened this issue Apr 26, 2018 · 5 comments · Fixed by standard/standard-engine#228
Closed

improve glob support #1117

zaynv opened this issue Apr 26, 2018 · 5 comments · Fixed by standard/standard-engine#228

Comments

@zaynv
Copy link

zaynv commented Apr 26, 2018

Let's say I have a folder structure like this:

└── src
    ├── 1.js
    └── 2.js

If I run eslint src with the eslint-config-standard setup, it works as expected:

/Users/zaynv/Desktop/test/src/1.js
  1:5   error  'x' is assigned a value but never used  no-unused-vars
  1:11  error  Extra semicolon                         semi

/Users/zaynv/Desktop/test/src/2.js
  1:5   error  'y' is assigned a value but never used  no-unused-vars
  1:11  error  Extra semicolon                         semi

But if I run standard src, I get no output. To get it to work, I would need to do standard src/*.js instead. Is it possible to add support for this in standard as well?

I think this is where eslint is doing this:

https://github.com/eslint/eslint/blob/b32d1f48cecc1eecd1352a978d7b393ad047337c/lib/util/glob-util.js#L25-L73

@feross
Copy link
Member

feross commented Apr 26, 2018

I suppose we should consider this since it's probably surprising to most users.

@Flet do you have thoughts about the viability of adding this to deglob?

@Flet
Copy link
Member

Flet commented Apr 26, 2018

Yeah this makes sense to me!

@stale
Copy link

stale bot commented Jul 25, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale label Jul 25, 2018
@stale stale bot closed this as completed Aug 1, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Oct 30, 2018
@standard standard unlocked this conversation Aug 5, 2019
@feross feross reopened this Aug 5, 2019
@stale stale bot removed the stale label Aug 5, 2019
@matthewadams
Copy link

Supporting globs including recursive ones like standard 'src/**/*.js' would also be great. For now, I have to execute commands like find src -name '*.js' | xargs standard --verbose, which is both more verbose and also not platform-agnostic.

@feross
Copy link
Member

feross commented Oct 29, 2020

This will be fixed in standard 16

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants