-
-
Notifications
You must be signed in to change notification settings - Fork 7
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: Update types.ts
for compatibility with verbatimModuleSyntax
#88
Conversation
I verified this locally with diff --git a/dist/esm/types.ts b/dist/esm/types.ts
index f8dc7e1bee1a342e233c513d142aec97e08c6369..577f2229bb2d64db4868d482cb79586f350f59a1 100644
--- a/dist/esm/types.ts
+++ b/dist/esm/types.ts
@@ -14,7 +14,7 @@ import type {
LanguageOptions,
RuleDefinition,
} from "@eslint/core";
-import {
+import type {
DocumentNode,
MemberNode,
ElementNode, |
Thanks for looking into this. It would be helpful to have a test to run in CI to validate this change. Is it possible to update |
Thanks @nzakas, I've just added a pass/fail test for one of the affected types. Please let me know if that's not what you had in mind though! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to add "verbatimModuleSyntax": true
to tests/types/tsconfig.json
, otherwise the new test will pass even if the change in the source file is reverted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, updated!
types.ts
for compatibility with verbatimModuleSyntax
types.ts
for compatibility with verbatimModuleSyntax
Note: I've changed the tag in the PR title to "fix:" because this change fixes a bug. |
LGTM, thanks! Leaving open for @nzakas to verify. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks!
Prerequisites checklist
What is the purpose of this pull request?
After using this package in with the new
verbatimModuleSyntax
TypeScript compiler option, I hit the below error.What changes did you make? (Give an overview)
Changed to a type-only import for imports from
@humanwhocodes/momoa
.Related Issues
Related to #84.
Is there anything you'd like reviewers to focus on?
Only one line changed.