-
-
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
Error with relative paths #143
Comments
I honestly don't know. If you believe there is a bug in lint-staged, please provide me with a reproducible repo on GitHub. I've also noticed that your config isn't quite correct: you don't need file globs in your tasks when running them with lint-staged since this is what this lib is responsible for — passing the matched file paths to scripts. It also supports I'd recommend to try this config out: "lint-staged": {
"gitDir": "../../../",
"linters": {
"subpath/src/**/*.js": [
"prettier --single-quote --print-width=90 --trailing-comma=all --write",
"git add"
],
"subpath/src/styles/**/*.css": [
"stylefmt",
"git add"
]
}
} |
@okonet Thanks, it works! |
Same. Just use the name of your script and "it will just work" tm |
Hi!
I am using
lint-staged
in a subfolder, with the following configuration:When trying to commit it fails with the following error:
But running the npm script works without problem:
Why it is trying to find a
package.json
at the root of the project?The text was updated successfully, but these errors were encountered: