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
Add --globby-options
flag
#6109
Comments
@silversonicaxel Thanks for reporting the issue and using the template. Stylelint uses internally I think you can specify dot files like this: stylelint '**/*.css' '.*/**/*.css' See also https://stylelint.io/user-guide/usage/node-api/#globbyoptions |
Hello @ybiquitous , I've a question, will it be solved soon the issue? or not really?
it works, it is simply not so neat |
@silversonicaxel Thanks for sharing the pain. Indeed, it's a bit ugly. It may be good to add a CLI option to traverse dotfiles, but I'm unsure. I'll let the issue open for further discussion. |
@ybiquitous We should not lint |
My folder is So I also understand @alexander-akait point of view. In my opinion this should be also a config parameter, so users can decide their preferences. What do you think? |
For the |
I am fine with an additional option |
Who's going to be in charge of this implementation? How does it work? |
@alexander-akait @silversonicaxel So, it seems we need to consider a new CLI option to pass $ tree .foo
.foo/
├── .bar/
│ └── a.css
└── a.css
1 directory, 2 files
$ npx stylelint '.foo/**/*.css'
.foo/a.css
1:12 ✖ Unexpected unit length-zero-no-unit In the example above, we should want to check not only Decisions required for the new option if needed:
stylelint '.foo/**/*.css' --dot
# should match `.foo/a.css` and `.foo/.bar/a.css`
stylelint '**/*.css' --dot --ignore-pattern '.git/**'
# should be useful with `.stylelintignore` or `--ignore-pattern` Any thoughts? |
I would like to have this command in my script
and regarding this
could also live in
but then it is up to the consumers who are into hidden folders to set them in the ignore list to me looks good like this! |
We already expose the globby options object to the Node.js API. Can you make it available to the CLI too? For example:
It'll save us adding a new option for this edge case. |
Considering consistency with the Node.js API, |
.
)
Let's an
It's great you want to help as a new feature is generally implemented by the person who requested it or by someone who also needs it. The team working on Stylelint have time to review pull requests, but not time to implement features like this unless they need it themselves. @silversonicaxel I've labelled the issue as ready to implement. Please consider contributing if you have time. |
@jeddy3 @ybiquitous is this done or shall i pick this up? |
@sidverma32 Thank you! Nobody currently works on this issue, so please feel free to create a pull request. |
Can you guide me which file to refer to add this Also i can see this |
thanks, I also had issues to implement myself this interesting feature. kudos to volounteers! |
@sidverma32 To support the Line 506 in 7fbf297
Line 52 in 7fbf297
|
By new or something like this:
|
I mean: if (cli.flags.globbyOptions) {
optionBase.globbyOptions = cli.flags.globbyOptions;
} |
Thanks for clarification! Please have a look over the raised PR and let me know if i missed any detail. |
I tried the upgraded version of stylelint but I still have the same issue and I wanted to share it again here. |
Stylelint ignores hidden folders by default, so we need to pass --globby-options '{"dot":true}' to ensure that CSS files in `.github` workflow folders are checked. For background, see: - stylelint/stylelint#6109 - stylelint/stylelint#6437 (comment)
What steps are needed to reproduce the bug?
Create a folder beginning with a dot, and set a css or scss file and run a
stylelint --fix
command. It won't work.I'm experiencing this problem with
.storybook
folder.What Stylelint configuration is needed to reproduce the bug?
any configuration would be enough
How did you run Stylelint?
stylelint --fix '**/*.css
Which version of Stylelint are you using?
13.13.1
What did you expect to happen?
The lint fixes also files present in hidden folders
What actually happened?
Hidden folders files are ignored
Does the bug relate to non-standard syntax?
No
Proposal to fix the bug
Read also hidden folders
The text was updated successfully, but these errors were encountered: