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

💡 Flag unused ignore/ignoreDependencies rules #837

Closed
bigpopakap opened this issue Nov 14, 2024 · 2 comments
Closed

💡 Flag unused ignore/ignoreDependencies rules #837

bigpopakap opened this issue Nov 14, 2024 · 2 comments
Labels
feature request Feature request

Comments

@bigpopakap
Copy link

bigpopakap commented Nov 14, 2024

Suggest an idea for this project

I have configured ignoreDependencies and ignore in my project:

  • I have some ignore rules to quiet issues that will be solved soon (eg. for a util file that is currently unused, but will be used imminently)
  • I have some ignoreDependencies rules for other issues (eg. I ignore "@next/eslint-plugin-next" and "eslint-config-next" because of 🐛 ESLint edge case: flatCompat.extends in FlatConfig files #818)

When these issues are resolved (I use that util function again, or #818 is solved), I'd like to be notified by Knip that my ignore/ignoreDependencies configurations are no longer necessary.

Knip could detect if/when ignoreDependencies: ["@next/eslint-plugin-next"] or ignore: ["lib/myUtil.ts"] don't actually suppress anything, and report this as a warning or error (probably configurable - not everyone will want this).

@bigpopakap bigpopakap added the feature request Feature request label Nov 14, 2024
@webpro
Copy link
Collaborator

webpro commented Nov 14, 2024

For ignoreDependencies this already works.

The configuration hints are warnings, not errors indeed.

@webpro
Copy link
Collaborator

webpro commented Feb 11, 2025

Unfortunately, as for entry patterns, I expect warnings about unused ignore patterns aren't going to make it in anytime soon.

@webpro webpro closed this as not planned Won't fix, can't repro, duplicate, stale Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Feature request
Projects
None yet
Development

No branches or pull requests

2 participants