Skip to content

Conversation

@joshmeads
Copy link
Contributor

The start of this rabbit hole...
Syncpack supports the full cosmiconfig options but they weren't all provided.

I ended up going through most of the plugins with a primary focus on those using cosmiconfig, lilconfig or unconfig. I've updated a few others where the config array didn't match and added additional comments on where to find their config settings.

I've also created a small helper function to generate all the standard configs for the above unless it was listed otherwise.

The two fixtures I changed are the following:
.lockfile-lint.js to .lockfile-lintrc.js. The initial file is what's listed in their docs but not actually a valid cosmiconfig entry. See lirantal/lockfile-lint#192 for people reporting it.

xo-config.cjs to xo.config.cjs. https://github.com/xojs/xo/blob/ee9f0a3d72d55df098fc321c4d54a1ea3804e226/lib/constants.js#L114C1-L122C3 as you can see here, it can either be .xo-config.ext or xo.config.ext the original was invalid.

All tests are passing, format has been run.

Thanks for all your hard work on Knip! It was a wonderful codebase to work in as Bun & Biome are fantastic tools.

Hope this PR helps.

…smiconfig, Unconfig and Lilconfig defaults with controls for custom options
@netlify
Copy link

netlify bot commented Jun 26, 2024

‼️ Deploy request for knip rejected.

Name Link
🔨 Latest commit edcfa7b

@webpro
Copy link
Member

webpro commented Jun 26, 2024

Thanks, Josh! Great PR overall, I'd love to merge it. Just a stylistic formatting issue CI complains about.

Here's example output: https://667c8b5c70aa84101ab722b3--knip.netlify.app/reference/plugins/commitlint

@joshmeads
Copy link
Contributor Author

I'll take a look tonight! Thanks!

@joshmeads
Copy link
Contributor Author

@webpro updated - let me know if this works! Thanks

@webpro webpro merged commit 85a2fb5 into webpro-nl:main Jun 29, 2024
@webpro
Copy link
Member

webpro commented Jun 29, 2024

Fantastic, thanks Josh!

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