-
-
Notifications
You must be signed in to change notification settings - Fork 140
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
Respect up-the-tree .gitignore
files
#531
Comments
Does something like npm do the same eg when publishing? |
Doesn't look like it, unfortunately: https://stackoverflow.com/q/12534699/242684 Though I wouldn't treat npm's choices as gospel 😅 |
To frame this a little bit differently, how else could I tell Knip to ignore |
I'm not against the feature per se, but I also don't want unexpected results. What might be a feature to you, could be a hard-to-track and tricky-to-overcome issue to someone else. So if other tools use it as well it's common/expected behavior.
You can use |
I'm struggling to find examples. Prettier doesn't respect
On the one hand, I agree, changes like this require justification. On the other hand, Git is the common denominator here. If a file ultimately isn't committed, does it make sense to ever take it into consideration? |
It should probably just follow whatever |
I have a
.gitignore
in my~
with the following contents:.scratch/
This allows me to plop
.scratch
directories all over the place and put not-for-remote stuff there like personal notes, half-baked code snippets, etc. Knip, unfortunately, doesn't look at~/.gitignore
and reports code files in.scratch
directories as unused.I don't want to add
.scratch
to the repo.gitignore
because it has nothing to do with the project. I don't want to store these files outside of the repo because I want to keep them close to the packages they're related to.The text was updated successfully, but these errors were encountered: