-
-
Notifications
You must be signed in to change notification settings - Fork 128
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
Arguably terrible enum identifiers causes breakage. #595
Comments
Knip should definitely not choke on those indeed. A PR would be great, otherwise I'll pick it up after the weekend. |
Hey, bro, it looks like this problem still hasn’t been solved. Do you have any plans to fix it soon? |
🚀 This issue has been resolved in v5.17.4. See Release 5.17.4 for release notes. Using Knip in a commercial project? Please consider sponsoring me. |
So I was trying to run
knip
on a larger project and was runing into errors that was not very clear to me at first.After adding some logging into the
getImportsAndExports.js
I managed to find that it was choking parsing an enum we have to handle potential values ofKeyboardEvent.key
, including keys like*
and+
, which is arguably a terrible idea, but is allowed in Typescript, so I guess knip shouldn't fail on it either.Here's a repro: https://stackblitz.com/edit/github-4tmeki?file=enum.ts%3AL21
I think it should be pretty easy to amend, I might send a PR too
The text was updated successfully, but these errors were encountered: