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
Many errors in standard output when using git sparse-checkout #1383
Comments
Hey, looks like this might be related to the automatic monorepo features. Since all the type definition packages include a It would probably be a lot faster to use a single explicit config file, if that's all you need: npx lint-staged --config .lintstagedrc.js This should hopefully make lint-staged skip trying to read every single possible config file. |
We use lint-staged/lib/searchConfigs.js Line 16 in adf50b0
|
Thank you, that did it! Now lint-staged succeeds without trying to access all those
Thanks for pointing this out. I found this SO answer, which suggests adding verbose flag to tl;dr;, the above in shell git ls-files -v | grep -e '^H' | grep 'package.json$' |
Glad to hear it! For now I won't add this extra filtering, but if this issue surfaces again I will look at it again. |
…nd lint-staged by @tpluscode * style: optional formatting on pre-commit hook * explicit lint-staged config (re lint-staged/lint-staged#1383) * docs: mention checking out hooks, + tweak hook command * chore: remove config (moved to .lintstagedrc.jsn) * refactor: lint-staged everything * Update README.md Co-authored-by: Jake Bailey <5341706+jakebailey@users.noreply.github.com> * docs: move git hook section --------- Co-authored-by: Jake Bailey <5341706+jakebailey@users.noreply.github.com>
Description
I'm trying to set up
lint-stage
on https://github.com/DefinitelyTyped/DefinitelyTyped. Since that repo moved topnpm
as a monorepo, the recommended workflow is to use sparse checkout and only check out thosetypes/*
dirs which one is working on.This apparently causes a ton of errors like this, for every single
types/*
directory which is not currently checked out.Otherwise, linting succeeds
Steps to reproduce
git clone --sparse --filter=blob:none --depth=1 git@github.com:tpluscode/DefinitelyTyped.git
git switch lint-staged
git sparse-checkout add types/node
pnpm i
types/node/index.d.ts
git add --sparse types/node/index.d.ts
pnpm lint-staged
Debug Logs
That repo produces a log so big that I just upload the whole thing:
log.log
Environment
lint-staged
: 15.2.0The text was updated successfully, but these errors were encountered: