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

fix: make types usable in CommonJS #77

Merged
merged 1 commit into from
Jan 13, 2025
Merged

fix: make types usable in CommonJS #77

merged 1 commit into from
Jan 13, 2025

Conversation

fasttime
Copy link
Member

Prerequisites checklist

What is the purpose of this pull request?

Similar to eslint/rewrite#143, this PR ensures that the @eslint/json types can be imported from a CommonJS module when moduleResolution is one of 'node16' or 'nodenext'. This is currently not possible because of an issue with the types in @eslint/plugin-kit that has been fixed in the latest version v0.2.5.

What changes did you make? (Give an overview)

  • Updated dependency @eslint/plugin-kit to version spec "^0.2.5".
  • Made @eslint/core a runtime dependency of this package.
  • Added tests to ensure that @eslint/json can be imported from a .cts file.

Related Issues

refs eslint/rewrite#143.

Is there anything you'd like reviewers to focus on?

Copy link
Member

@mdjermanovic mdjermanovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

Would like @nzakas to verify before merging.

Copy link
Member

@nzakas nzakas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks.

@nzakas nzakas merged commit 41ef891 into main Jan 13, 2025
14 checks passed
@nzakas nzakas deleted the fix-cjs-types branch January 13, 2025 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Complete
Development

Successfully merging this pull request may close these issues.

3 participants