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

Code improvement (no usage of eval) to import ESM and require modules #378

Open
theoludwig opened this issue Feb 6, 2022 · 1 comment
Open

Comments

@theoludwig
Copy link
Member

Problematic lines:

// eslint-disable-next-line no-new-func, @typescript-eslint/no-implied-eval
library = (await Function(`return import('file://${path.replace(/\\/g, '\\\\')}')`)()).default

Ref: #376 (comment)

Once TypeScript doesn't transpile await import to require we'll be able to change that to be simpler and safer.

@LinusU
Copy link
Member

LinusU commented Feb 6, 2022

Could also be solved by: microsoft/vscode#130367

@theoludwig theoludwig removed their assignment May 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

2 participants