-
-
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
stylefmt example broken for multiple files #164
Comments
Yes, as of https://github.com/okonet/lint-staged/blob/master/src/findBin.js#L6 That's needed to be able to pass arguments to npm tasks. See https://docs.npmjs.com/cli/run-script |
Is this related to #138? |
#138 would solve this usecase I think
It was also really difficult to figure out that In the past I've manually added the I actually thing #138 would be how I'd do things by default, it means a new comer is more likely to understand what's going on. Thanks for the library. It's saving my team and I loads of time! |
Yeah, good suggestion to make it default. I don't know if this will be too verbose though. If you have multiple commands it might become a pain to setup. |
I believe I've been running into this issue lately. Just wondering if there was a working solution around it until a fix is implemented. It's been overwriting random files, possibly because the first argument for stylefmt is
|
The workaround I'm using to account for
|
@chaucerbao just FYI you might not need this workaround with the latest version since it removes the addition of |
@okonet Confirmed that it works. Thanks! |
Here is a minimal example: https://github.com/richardgill/lint-staged-stylefmt-bug-example
stylefmt doesn't accept multiple files on the command line. Looks like there used to be a
--list
parameter, but it's not longer there.Using
--recursive
works for me vianpm run
but doesn't work with lint-staged. I think I am seeing an additional--
getting added to the command which messes withstylefmt
.Note that is only an issue for when you break the css for multiple files (add spaces before the
}
's to test. I think it works ok for one file.Could you confirm that lint-staged is adding an extra
--
and once I full understand what's going on. We can raise an issue with stylefmt.Thanks,
The text was updated successfully, but these errors were encountered: