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

Issue a warning or fail if a specific file given as an entry point does not exist #618

Closed
ptmkenny opened this issue May 1, 2024 · 1 comment
Labels
feature request Feature request

Comments

@ptmkenny
Copy link
Contributor

ptmkenny commented May 1, 2024

Simple knip.json:

{
  "entry": [
    "src/main.tsx!",
    "does-not-exist.ts",
  ]
}

does-not-exist.ts is a non-existent file. When you run npm run knip, there is no warning or error even though does-not-exist.ts does not exist.

It would be great if Knip had a check that issued an error or warning if any file specified as an entry point did not exist (and maybe also for regex if the regex had no match).

For large projects that change over time, I would prefer to get an error that could be caught in CI so that I could update the knip.config when I make major changes that affect the entry points.

@ptmkenny ptmkenny added the feature request Feature request label May 1, 2024
@webpro
Copy link
Collaborator

webpro commented May 2, 2024

Duplicate of #331. Agreed it's useful, but I currently just don't have the bandwidth to work on such nice-to-haves. It also requires work on the console streamer. Might pick it up later down the road.

@webpro webpro closed this as not planned Won't fix, can't repro, duplicate, stale May 2, 2024
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