Skip to content

chore: add Knip to check for unused code and deps#424

Merged
lwasser merged 7 commits intoall-contributors:mainfrom
JoshuaKGoldberg:knip
Feb 12, 2026
Merged

chore: add Knip to check for unused code and deps#424
lwasser merged 7 commits intoall-contributors:mainfrom
JoshuaKGoldberg:knip

Conversation

@JoshuaKGoldberg
Copy link
Copy Markdown
Contributor

@JoshuaKGoldberg JoshuaKGoldberg commented Jan 31, 2026

Closes #423.

The removed points are:

@babel/runtime isn't explicitly referenced anywhere, but kcd-scripts build fails if it's not there:

> [email protected] build /home/runner/work/cli/cli
> kcd-scripts build

Error: [BABEL]: You should add @babel/runtime as dependency to your package. It will allow reusing "babel helpers" from node_modules rather than bundling their copies into your files. (While processing: /home/runner/work/cli/cli/node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/kcd-scripts/dist/config/babelrc.js)
    at Object.<anonymous> (/home/runner/work/cli/cli/node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/kcd-scripts/dist/config/babelrc.js:32:9)

@JimMadge
Copy link
Copy Markdown
Member

We might want to bring the commitizen and semantic release packages back as dev dependencies for the release process. I'm not exactly sure what they do.

I expect we would want to keep the existing commit convention and release style just for consistency.

@lwasser
Copy link
Copy Markdown
Member

lwasser commented Jan 31, 2026

We might want to bring the commitizen and semantic release packages back as dev dependencies for the release process. I'm not exactly sure what they do.

I expect we would want to keep the existing commit convention and release style just for consistency.

Lemme open an issue as I think I'd personally prefer to remove semantic release - but I do want to talk it out as to why!! in case i'm missing something important !!

@lwasser
Copy link
Copy Markdown
Member

lwasser commented Jan 31, 2026

Oh, actually - can you all have a look at #420 please and respond there?

@JoshuaKGoldberg JoshuaKGoldberg marked this pull request as ready for review February 10, 2026 15:21
Comment thread package.json Outdated
"dependencies": {
"@babel/runtime": "^7.7.6",
"chalk": "^5.6.2",
"async": "^3.1.0",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"async": "^3.1.0",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to fix the merge conflict and of course readded this back by mistake.

Comment thread package.json Outdated
"chalk": "^5.6.2",
"async": "^3.1.0",
"chalk": "^4.0.0",
"didyoumean": "^1.2.1",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"didyoumean": "^1.2.1",

Removed 'async' and 'didyoumean' dependencies, updated 'chalk' version.
Copy link
Copy Markdown
Member

@lwasser lwasser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great!! Thank you @JoshuaKGoldberg

@lwasser lwasser changed the title chore: added Knip chore: add Knip to check for unused code and deps Feb 12, 2026
@lwasser lwasser merged commit 0ccc048 into all-contributors:main Feb 12, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tooling: Add Knip for detecting unused code & dependencies

3 participants