-
-
Notifications
You must be signed in to change notification settings - Fork 412
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
Allow explicitly adding other changed files without warning #770
Comments
The What do you think? |
Another possibility would be to always run |
What if we allow the |
It actually is allowed, the warning doesn’t prevent it from running. A config flag could disable the warning, but I’m leaning on showing it only when |
That could work. The slightly awkward thing is that it means that, in some sense, I'd be running I'm not sure if there's a good way around that. I could get around all this with a |
To clarify, when lint-staged starts it will gather a list of staged files. After running the tasks, it will run Assuming |
I meant all the other files. That is, if I change Obviously not a big deal, but ... |
Ah yes, you are correct. |
On the other hand, adding a new API primitive or special behavior for just Would it work to make the behavior in 083b8e7 optional? i.e. make it so that the |
Can you live with the warning for a while, @taion? I think there are multiple valid approaches and we need to figure out the best. In my opinion having the automatic This displayed warning was meant as a notification to migrate the 99 % simple cases that have followed the project's examples, but it might be unnecessary to display anything (since it's in the CHANGELOG). |
Sure, that’s for me for now. |
🎉 This issue has been resolved in version 10.0.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Description
I have a lint-staged pipeline that looks sort of like this, triggered by a Husky
pre-commit
hook:The idea here is that the
update-schema
script will updatedata/schema.graphql
, and I want the commit to include synced changes.The changed behavior around
git add
in v10.0.0 presents some challenges. Thegit add data/schema.graphql
now generates a CLI warning that I can't disable. However, if I remove it, then changes todata/schema.graphql
generated by theupdate-schema
script no longer get added to my commit.I can avoid the warning by doing something like
() => 'git add data/schema.graphql'
, but that would require me to add an explicit JS config file, instead of just inlining my config inside mypackage.json
.Is there a good way, then, to support this use case while still using JSON configuration?
Environment
lint-staged
: v10.0.0The text was updated successfully, but these errors were encountered: