Skip to content
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

Migrate to using ESM #158

Merged
merged 4 commits into from Oct 15, 2021
Merged

Migrate to using ESM #158

merged 4 commits into from Oct 15, 2021

Conversation

rwjblue
Copy link
Collaborator

@rwjblue rwjblue commented Oct 15, 2021

No description provided.

This works around an issue with node/no-missing-import that doesn't
properly see that `node:path` is a valid module on Node 12.x.

They are using `is-core-module` to figure out if it is a module or not,
and it seems that `is-core-module` doesn't differentiate between core
modules that are available for CJS (the `node:` prefixed paths are only
available in 14.18+ and 16+ in CJS files) and those that are available
to ESM.

This is really just a bandaid, the right fix would be to send a PR to
is-core-module to allow it to check CJS vs MJS modules (since they are
actually different).

See mysticatea/eslint-plugin-node#299
@rwjblue rwjblue merged commit 59ec228 into master Oct 15, 2021
@rwjblue rwjblue deleted the migrate-to-esm branch October 15, 2021 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant