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
"No files matching the pattern" when using Windows #5122
Comments
Could you try to put a file path in double quotes?
|
Thank you so much for the quick reply. I have tried placing the file in quotes and I receive the same error as in the original post. Since posting, I have tried 13.8.0 and receive the same issue. I'm going to try 13.7.2 next. |
I have also tried 13.7.2 now and same problem. I'm wondering now if this is possibly a dependency issue that could be causing this? |
I started seeing this exact error after upgrading stylelint from 10.0.1 to 13.13.0. So a temporary workaround is to revert to an older version until this is fixed. |
It works by using slashes "/" in paths. If I use backslashes "\" I got that errors. Windows, of course. Can it be a bug of a base package? |
We're seeing this issue as well on our team. |
Apparently there's a change in the globby API causing this issue. My colleague is preparing a PR. |
As mentioned by @woutervanvliet the problem lies in globby, from version 10 it doesn't support backward slashes in globs, which is also stated in their documentation here A quick hack where backslashes where replaced with forward slashes on the fileList supplied to globby in standalone.js, makes a couple of tests break (when running the tests on both windows and linux), but makes stylelint work in windows with standard backslash paths.. So need to look into that part. |
Fixed by #5386 |
Yes, but we need help getting 14.0.0 ready for release. The next task is adding a |
I updated lint-staged to "10.0.0" and solved this problem |
When using stylelint on Windows using a file path with a normal Windows path ex.
C:\dev\myfile.scss
, stylelint reports "No files matching the pattern". This is the same issue that was reported in #4772 but that issue was closed as not enough information was provided.This does work when forward slashes are used but this is not the standard file path used by Windows. This also affects other tools such as
@speedy/build-angular
which uses stylelint under the hood to pass a list of files to lint.This is not related to any specific Rule. This is about running stylelint successfully on a Windows platform.
N/A but a simple file may be used such as:
N/A but the following can be used to match the example above.
13.9.0
Using the CLI with the following command:
stylelint c:\dev\myfile.scss
I am using SCSS but this is not a bug with the parsing of the file.
I expect the command to complete successfully when using standard Windows file path with backslashes.
The following error message was written to the console:
Notes:
To fix this, I think stylelint just needs to normalize the file paths for the files passed into it to a format that it expects.
The text was updated successfully, but these errors were encountered: