Skip to content

Docs: Mention verbatimModuleSyntax in docs for rules that encourage ESM import syntax #10568

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

Closed
2 tasks done
kirkwaiblinger opened this issue Dec 30, 2024 · 3 comments · Fixed by #10588
Closed
2 tasks done
Labels
accepting prs Go ahead, send a pull request that resolves this issue documentation Documentation ("docs") that needs adding/updating locked due to age Please open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.

Comments

@kirkwaiblinger
Copy link
Member

Before You File a Documentation Request Please Confirm You Have Done The Following...

Suggested Changes

We have several rules that promote ESM syntax over CJS syntax. However, these won't necessarily play well with CJS projects using verbatimModuleSyntax. I propose we should mention caveats or inapplicability for rules that don't make sense with verbatimModuleSyntax.

Off the top of my head:

Affected URL(s)

https://typescript-eslint.io/rules/no-require-imports
https://typescript-eslint.io/rules/no-namespace/
possibly others?

Additional Info

No response

@kirkwaiblinger kirkwaiblinger added triage Waiting for team members to take a look documentation Documentation ("docs") that needs adding/updating labels Dec 30, 2024
@JoshuaKGoldberg
Copy link
Member

I like this - we should definitely better document this case. Maybe it deserves a standalone blog post as a guide, to put everything in one place?

@kirkwaiblinger
Copy link
Member Author

Maybe just an FAQ unless we find more cases? We have a long blog post backlog and I'm not sure this quite warrants it. What do you think?

@JoshuaKGoldberg
Copy link
Member

Heh, I always forget we have such thorough FAQs... definitely. +1

@kirkwaiblinger kirkwaiblinger added accepting prs Go ahead, send a pull request that resolves this issue and removed triage Waiting for team members to take a look labels Dec 30, 2024
@github-actions github-actions bot added the locked due to age Please open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing. label Feb 4, 2025
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 4, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepting prs Go ahead, send a pull request that resolves this issue documentation Documentation ("docs") that needs adding/updating locked due to age Please open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.
Projects
None yet
2 participants