refactor: add write-types-export script#453
refactor: add write-types-export script#453JoshuaKGoldberg wants to merge 1 commit intoeslint:mainfrom
Conversation
|
Hi @JoshuaKGoldberg 😄 I've taken another shot at this and wanted to share a different approach. Here's what I did:
export default {};
// ...
export default plugin;
export { MarkdownSourceCode };
+ export * from "./types.js";This approach seems to work well, since it allows all types from What do you think of this approach? I'd love to hear your thoughts. |
|
Ha nice that's smart! I like it. I'd separately thought of proposing converting just |
|
That proposal looks good to me as well 👍 If the proposal is accepted, it might be cleaner to export the types. Would now be a good time to ask TSC members about migrating type imports from |
|
That is a great question, and I don't know how or where to push it 😄. Mentioned in: eslint/eslint#19920 |
|
Ah, thank you! If it's alright, let's wait a bit for the team's decision. 😄 After that, I think we can open a separate issue for it. |
|
Hi everyone, it looks like we lost track of this pull request. Please review and see what the next steps are. This pull request will auto-close in 7 days without an update. |
|
Hi, @JoshuaKGoldberg I've created an issue in eslint/rewrite#403, and it's been decided to postpone this change until ESLint v10. After v10, we can drop CJS module support, since Node.js will natively support |
|
I think we can move this change forward now, since the Markdown plugin is ESM-only and I've confirmed it here: eslint/rewrite#403 (comment). If you're available, it would be great if you could take it forward. (If not, I am happy to take it on.) |
|
I'm kindly closing this PR now since #520 has been merged :) |


Throwing up as a reference for one strategy to solve the types re-export issue.