Skip to content

Handle non-string dynamic imports gracefully#17

Open
renanccastro wants to merge 2 commits intomainfrom
fix/handle-non-string-dynamic-imports
Open

Handle non-string dynamic imports gracefully#17
renanccastro wants to merge 2 commits intomainfrom
fix/handle-non-string-dynamic-imports

Conversation

@renanccastro
Copy link
Copy Markdown
Contributor

Summary

  • When a dynamic import uses a variable instead of a string literal (e.g. await import(varName)), the parser now logs a warning and skips the import instead of crashing the entire lint run.
  • This was encountered in a large Meteor project where Sentry was dynamically imported based on a runtime condition.

Test plan

  • Verified on a large Meteor 2 codebase (~3000+ files) that the plugin no longer crashes
  • Warning is logged so users are aware the import was skipped

Renan Camargo de Castro added 2 commits April 7, 2026 10:44
When a dynamic import uses a variable instead of a string literal
(e.g. `await import(varName)`), the parser now logs a warning and
skips the import instead of crashing the entire lint run.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant