-
Notifications
You must be signed in to change notification settings - Fork 80
fix: remove unused types from types.ts
#462
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
Conversation
|
In general, Knip is great at solving unused types and the like. Unfortunately it can't detect this specific issue because I suppose we could write a custom lint rule or similar for things that exist and are exported in one file, do not refer to existing types, and are not used elsewhere? That's quite niche. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✂️
Exported types in |
|
The As for I've also searched for it on GitHub, but it looks like ESLint doesn’t use this type internally. https://github.com/search?q=%40eslint%2Fmarkdown%2Ftypes&type=code |
I think it's safe to remove |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
Prerequisites checklist
What is the purpose of this pull request?
Hello,
While reviewing the
types.tsfile, I noticed thatMessageandRuleTypeare not used anywhere.It seems these two types were not removed during the refactor.
I think removing unused types would be helpful, but I'm not sure if this should be considered a breaking change, since users can import types from
types.tsvia@eslint/markdown/types, and version 7 was just released.On the other hand, since these types were likely included by mistake during a refactor, it might make sense to treat their removal as a fix.
I'd be interested to hear team's thoughts on how we should handle these unused types.
(Personally, I don't think these two types play an important role in the markdown plugins.)
What changes did you make? (Give an overview)
Related Issues
Is there anything you'd like reviewers to focus on?