Skip to content

feat: markdownlint-cli2#1887

Merged
webpro merged 4 commits into
webpro-nl:mainfrom
Zamiell:fix-markdownlint-bug
Jul 20, 2026
Merged

feat: markdownlint-cli2#1887
webpro merged 4 commits into
webpro-nl:mainfrom
Zamiell:fix-markdownlint-bug

Conversation

@Zamiell

@Zamiell Zamiell commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

This PR adds support for markdownlint-cli2, which is considered better than markdownlint-cli.

I had 5.6 Sol help me out with this.

@pkg-pr-new

pkg-pr-new Bot commented Jul 16, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/knip@1887
npm i https://pkg.pr.new/@knip/language-server@1887
npm i https://pkg.pr.new/@knip/mcp@1887

commit: be65059

@webpro

webpro commented Jul 18, 2026

Copy link
Copy Markdown
Member

Thanks for the PR! Looks like the plugin creation script wasn't used. Please see at least both of ./AGENTS.md and .agents/PLUGINS.md.

@Zamiell

Zamiell commented Jul 18, 2026

Copy link
Copy Markdown
Contributor Author

I intentionally did not create a new plugin though so that we could keep all of the markdownlint stuff together. To be clear, do you want me to create a new plugin? It seems like potentially bad design, because updates to markdownlint would force changes to two separate plugin files.

@webpro webpro left a comment

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.

Sorry I saw only the changed files and didn't catch you merged it into the existing one. One nit I have.

Comment thread packages/knip/src/plugins/markdownlint/index.ts Outdated
@Zamiell
Zamiell requested a review from webpro July 18, 2026 14:25
assert.deepEqual(counters, {
...baseCounters,
binaries: 1,
devDependencies: 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.

FYI, the unused binary/devDep are caused by missing node_modules dir for knip to connect the dots (hint).

@webpro

webpro commented Jul 18, 2026

Copy link
Copy Markdown
Member

Thanks for the fix! Any chance you could look into the failed ecosystem test?

@Zamiell

Zamiell commented Jul 18, 2026

Copy link
Copy Markdown
Contributor Author

Knip treats that as a direct  markdownlint  dependency, but it’s a built-in preset provided transitively by  markdownlint-cli2 . Hence the false-positive:
Unlisted dependencies (1)
.markdownlint.yml: markdownlint
The resolver should ignore built-in  markdownlint/style/*  presets while still reporting external  extends  packages.

Zamiell@603a5c1

@Zamiell
Zamiell requested a review from webpro July 18, 2026 15:57
@webpro

webpro commented Jul 20, 2026

Copy link
Copy Markdown
Member

Thank you, James!

We can ignore the remaining failed test (another repo using Knip fixed something).

@webpro
webpro merged commit 323b96f into webpro-nl:main Jul 20, 2026
29 of 30 checks passed
@Zamiell
Zamiell deleted the fix-markdownlint-bug branch July 20, 2026 11:52
@webpro

webpro commented Jul 22, 2026

Copy link
Copy Markdown
Member

🚀 This pull request is included in v6.28.0. See Release 6.28.0 for release notes.

Using Knip in a commercial project? Please consider becoming a sponsor.

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.

2 participants