-
Notifications
You must be signed in to change notification settings - Fork 1k
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
lint commands dont match files and weirdness.. #5325
Comments
The The restrictions of running lint under Windows should probably be mentioned in the CONTRIBUTING guide. I personally use Ubuntu if I need to run lint on the repo, where it works fine. I do not see the issue on Windows that no files are found by |
@MikeMcC399 Thanks for the response! I'm using powershell from vscode. I could update the CONTRIBUTING guide if you'd like. What is suggested that windows users do in this case when trying to prepare a pr to pass the lint check in the pipeline? |
I couldn't reproduce your problem using the same version of Windows PowerShell which you are using, however this is not a shell which I normally use, so I don't know if there are some settings which might affect the way that the commands are interpreted.
I guess that most contributors are running a POSIX compatible operating system such as Ubuntu or macOS, otherwise this issue would have been mentioned before.
In the past, I have either done the linting on Ubuntu or I have run npx prettier --check
npx prettier --write against the single file which I have edited. Assuming that you have That is however only my personal workaround. I don't know whether that should be published as a general recommendation. You should probably wait first for other comments. Edit: WSL2 under Windows is also a possibility as a POSIX-compatible environment. |
Thats what I ended up doing as well. Just pointing prettier to write the file I edited specifically. Not sure why its behaving this way on my machine, even looking at the docs of powershell it seems like this should be working. I'm good to close this out pending the potential update to the contributing guide. I feel like it might be good to have a section on lint commands and this behavior it has on non POSIX compatible operating systems. |
@0neMiss Since we don't have a specific recommendation to add to the CONTRIBUTING guide here, and the fact that the majority of our contributors are on POSIX systems, I'm going to close this out. If you do figure out what was going on with your Powershell setup I'm happy to reopen and consider adding a hint to the guide |
Description
When i ran the lint commands I expected it to match files and lint the project. instead it said it cant find any files matching that pattern
URL of Issue(s)
relates to a locally ran script
Steps to replicate
npm i
npm run lint:markdown
or any of the lint related commandsI was able to get the command to work by replacing
with
however after running
npm run lint-fix
with the updated command I'm showing over 250 files of diff.Even stranger, after checking what prettier had modified. I see no observable changes in any of the files.
Curious if I should make a pr to fix these 4 commands
Browser
N/A
Device
Additional Information
Some extra crap that might be useful if its not reproducable for everyone.
node and npm versions:
OS:
The text was updated successfully, but these errors were encountered: