💡 Add description to `KnipConfig` types
Suggest an idea for Knip
I would like to use KnipConfig types in a configuration file, so the IDE could hint me more accurately.
/** @type { import('knip'). KnipConfig } */
const config = { ... };
export default config;
But without at least a description, it is not that helpful.
It would be nice if you add the description for every type in KnipConfig:
https://github.com/webpro-nl/knip/blob/9590b9238d558098430f9535f95c1f40d437c2ec/packages/knip/src/ConfigurationValidator.ts#L47-L62
It's probably worth adding @default and @see. See:
- https://github.com/vitejs/vite/blob/9290d85b5d2ad64991bd296157cb3bcb959c341d/packages/vite/src/node/config.ts#L296
- https://github.com/eslint/eslint/blob/5db226f4da9ad7d53a4505a90290b68d4036c082/lib/types/index.d.ts#L1254
- https://github.com/prettier/prettier/blob/d9d0999aac70c04b06b35cbcb2c804b4a9c8d8a8/src/index.d.ts#L308
Great idea, @rakleed. Would you be up for a pull request to add this?
I don't know if I'll have the opportunity anytime soon. If anyone wants to do this, that would be nice.
I'll probably take a shot at this soon.
Thanks Arya, that'd be great!