Fixes to config files + Cosmiconfig, Lilconfig and Unconfig generation. #700
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The start of this rabbit hole...
Syncpacksupports the fullcosmiconfigoptions but they weren't all provided.I ended up going through most of the plugins with a primary focus on those using
cosmiconfig,lilconfigorunconfig. 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.jsto.lockfile-lintrc.js. The initial file is what's listed in their docs but not actually a validcosmiconfigentry. See lirantal/lockfile-lint#192 for people reporting it.xo-config.cjstoxo.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.extorxo.config.extthe 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.