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

pattern doesn't work as expected #73

Closed
cainaleaouk opened this issue Sep 23, 2019 · 3 comments · Fixed by #184
Closed

pattern doesn't work as expected #73

cainaleaouk opened this issue Sep 23, 2019 · 3 comments · Fixed by #184

Comments

@cainaleaouk
Copy link

Hi there,

I've been trying to get pretty-quick for my project but I'm having a hard time. I did test a few scenarios to try and have as much info before opening this ticket.

First of all I run a simple yarn prettier --check './src/v2/**/*.ts' it brought back many files, all of them ending in .ts as expected.

Then I got one of them, added a white space and staged it. Then I run the following.

yarn pretty-quick --staged --verbose pattern './src/v2/**/*.(ts|tsx)'

Since it was my only file staged it pick it up correctly.

Then for the sake of testing all functionalities, I changed a .js file and staged it. And to my surprise it actually tries and fix the js file. This is the cli output

yarn run v1.17.3
$ /Users/cainaleao/Development/project/node_modules/.bin/pretty-quick --staged --verbose pattern './src/v2/**/*.ts'
🔍  Finding changed files since git revision d81a571f11.
🎯  Found 2 changed files.
🔍  Examining front-end-build/planner-deps.js.
🔍  Examining front-end-build/src/v2/__tests__/_utils.ts.
✅  Everything is awesome!
✨  Done in 1.89s.```

Then I run the same first line again just to make sure prettier would not also try and change a `.js` file and it work as expected.

Not quite sure what is going on. If you need more information just let me know.

Cheers,
Cai





@cainaleaouk
Copy link
Author

Sorry opening and closing many times. I was trying to find a way to delete and create a new one.

Just as I finish writing the ticket I've realised pattern didn't have -- in front of it. SMH

So I added it thinking that that was the whole problem. But now it just won't find any files anymore. The same pattern I use for prettier that works won't work for pretty-quick.

@benbot
Copy link

benbot commented Nov 28, 2019

Could this be related to #63?

@JounQin
Copy link
Member

JounQin commented Jan 16, 2024

A minimal but runnable online reproduction is required.

SukkaW added a commit to SukkaW/pretty-quick that referenced this issue Jan 17, 2024
JounQin added a commit that referenced this issue Jan 17, 2024
Co-authored-by: JounQin <admin@1stg.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants