Skip to content

Add support for Prettier overrides#1869

Merged
webpro merged 4 commits into
webpro-nl:mainfrom
remcohaszing:prettier-overrides
Jul 6, 2026
Merged

Add support for Prettier overrides#1869
webpro merged 4 commits into
webpro-nl:mainfrom
remcohaszing:prettier-overrides

Conversation

@remcohaszing

Copy link
Copy Markdown
Contributor

Prettier overrides may define plugins in addition to the top-level config.

Prettier overrides may define plugins in addition to the top-level
config.
@pkg-pr-new

pkg-pr-new Bot commented Jul 6, 2026

Copy link
Copy Markdown

Open in StackBlitz

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

commit: aa00003

@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.

Thanks for the pull request! Happy to merge, just one non-blocking nit.

if (Array.isArray(options.plugins)) {
for (const plugin of options.plugins) {
if (typeof plugin === 'string') {
result.add(toDependency(plugin));

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.

Bit of a minor thing, but Input is an object so using a Set does not dedupe here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Right, that makes sense. Does deduplication even matter? It felt like the clean approach, but it probably doesn’t matter at all.

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.

Eventually Knip itself dedupes. Anyway let's roll with it.

@webpro
webpro merged commit 5dc7f12 into webpro-nl:main Jul 6, 2026
30 checks passed
@remcohaszing
remcohaszing deleted the prettier-overrides branch July 6, 2026 11:24
@webpro

webpro commented Jul 7, 2026

Copy link
Copy Markdown
Member

🚀 This pull request is included in v6.25.0. See Release 6.25.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