Skip to content
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

Add ability for a folder to be marked as ignored by kondo #150

Open
juh9870 opened this issue Dec 4, 2024 · 0 comments
Open

Add ability for a folder to be marked as ignored by kondo #150

juh9870 opened this issue Dec 4, 2024 · 0 comments

Comments

@juh9870
Copy link

juh9870 commented Dec 4, 2024

Would be nice to have an ability to create some sort of marker file in a directory (eg. .kondokeep), that would signal to kondo to not clean node_modules/target/etc from the folder.

My use case:
I want to regularly use kondo to clean up projects that weren't used in a week or two, but I have an important Node.js project, in which I need to preserve node_modules, otherwise some of my workflow breaks. What's worse, is that I also use syncthing to sync this project to multiple workstations to different paths, so I don't even have a reliable absolute path to ignore for kondo. I would love to just put some sort of .kondokeep into the project folder and be done with it.

GUI note:
Since this file can be inserted maliciously or by accident (aka, committed to git and then cloned), it would probably require different treatment from the -I flag. I suggest that directories ignored this way still show up in the list of folders in the GUI/CLI, but you just can't delete them. This would allow a user to see if any of their projects is using this .kondokeep, and clean it up manually if needed.

An extra idea is to also show the content of the .kondokeep in the CLI/GUI, so project authors can put some explanation into that file as to why this project should not be cleaned with kondo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant