Add support for TypeScript content mappers - #1978
Conversation
TypeScript 7.1 will add support for content mappers, allowing you to check files other than TypeScript, such as MDX, Vue, Ember, etc. This change makes Knip understand the the `package` field in the `contentMappers` entries refers to an npm package name.
commit: |
webpro
left a comment
There was a problem hiding this comment.
Thanks for the PR! Before merge I'll double-check on their progress first, but this is almost good as-is, yet one remark I have.
|
I built I think it would be nice if users can try this when TypeScript 7.1 (Beta? RC?) releases and Knip won’t complain about them adding content mapper dependencies. See microsoft/TypeScript#63703 for the release schedule. From the perspective of a content mapper implementation, it would be nice if Knip understands the |
Absolutely, happy to be on the forefront here. Let's make it happen. |
I'll pick this up in the next day(s) too, seems trivial. |
|
🚀 This pull request is included in v6.33.0. See Release 6.33.0 for release notes. Using Knip in a commercial project? Please consider becoming a sponsor. |
Hello from the future 👋
TypeScript 7.1 will add support for content mappers, allowing you to check files other than TypeScript, such as MDX, Vue, Ember, etc.
This change makes Knip understand the the
packagefield in thecontentMappersentries refers to an npm package name.This feature is still experimental. The configuration might change before the TypeScript 7.1 releases, but I don’t expect any changes.