-
Notifications
You must be signed in to change notification settings - Fork 76
refactor: add write-types-export script #453
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
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/json#130, 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/json#130 (comment). If you're available, it would be great if you could take it forward. (If not, I am happy to take it on.) |
Throwing up as a reference for one strategy to solve the types re-export issue.