-
Notifications
You must be signed in to change notification settings - Fork 76
chore: add lint:unused script to run Knip #466
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
base: main
Are you sure you want to change the base?
Conversation
Why is CI green when we have unused exports in the main branch, as per #462? |
Hi @snitin315, I'm not Joshua, but I found this comment in #462 😅
Currently, since the Lines 13 to 21 in 094a59d
|
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.
Today I learned what Knip does 😄
I'm in favor of this change 👍, but I'll move it to the Feedback Needed section for now to gather more input.
I've also left a minor comment.
I’ll check back in once a decision has been made 😄 |
Generally I'm on the side of more tooling, I'd just like a better explanation of what prompted this PR and why the check is green if there are unused exports. |
Hi everyone, it looks like we lost track of this pull request. Please review and see what the next steps are. This pull request will auto-close in 7 days without an update. |
It's the two reasons noted in the OP:
It's #466 (comment) <- #462 (comment). The specific kind of issue in #462 -a type being exported out of the package but not used by any external consumers- is out of scope for Knip. |
"$schema": "https://unpkg.com/knip@5/schema.json", | ||
"workspaces": { | ||
".": { | ||
"entry": ["tests/**/*.test.js", "tests/fixtures/*.js"], |
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.
"entry": ["tests/**/*.test.js", "tests/fixtures/*.js"], | |
"entry": ["tests/**/*.test.{js,ts}", "tests/fixtures/*.js"], |
I have a question. In https://github.com/eslint/rewrite/pull/241/files the ts
test files are included — should we include ts
here as well? There's a types.test.ts
in the tests
directory.
https://github.com/eslint/markdown/blob/main/tests/types/types.test.ts
Prerequisites checklist
What is the purpose of this pull request?
Adds Knip to check for unused exports, unused dependencies, and missing dependencies
What changes did you make? (Give an overview)
-y
to the jsr launch to explicitly always run it without promptingRelated Issues
Related to #462, which found types exported by the package but not used anywhere.
Is there anything you'd like reviewers to focus on?