You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note that it flags commitlint.config.ts as an unused file, and the 3 dependencies as unused.
All these issues are fixed by manually enabling the plugin with commitlint: true in the Knip config.
Reproduction access
I've made sure the reproduction is publicly accessible
It should also probably also use the commitlint package itself
In my project, I don't use @commitlint/cli, but I do use commitlint (in a git hook and on CI with the commitlint orb), and I have these in my devDependencies
Thinking about this more, it isn't clear to me whether the current behavior is broken or not.
The commitlint plugin correctly handles all dependencies and config files when it is enabled (which I currently do manually in my project). The question is whether @commitlint/cli should be the only dependency that causes it to be enabled. I don't think @commitlint/config-conventional or @commitlint/types should cause the dependency to be enabled - those are secondary packages that only make sense in your project if you are using commtlint.
However, maybe it does make sense to detect the commitlint package itself, as long as its used in some script. In my project (not included in the minimal repo link above), I use commitlint in:
.husky/commit-msg with the contents commitlint --edit "$1"
In my CircleCI config (.circleci/config.yml), with the commitlint/lint job (from this orb)
Perhaps that level of detection is getting too smart, and it's better to have projects manually enable the commitlint plugin in their Knip config
Prerequisites
Reproduction url
https://stackblitz.com/edit/github-hfa3yv?file=commitlint.config.ts
Note that it flags
commitlint.config.ts
as an unused file, and the 3 dependencies as unused.All these issues are fixed by manually enabling the plugin with
commitlint: true
in the Knip config.Reproduction access
Description of the issue
Currently, the commitlint plugin only uses
@commitlint/cli
to be enabledIt should also probably also use the
commitlint
package itselfIn my project, I don't use
@commitlint/cli
, but I do use commitlint (in a git hook and on CI with the commitlint orb), and I have these in mydevDependencies
The text was updated successfully, but these errors were encountered: