Skip to content

Commit

Permalink
chore: disable no-new-func eslint rule
Browse files Browse the repository at this point in the history
  • Loading branch information
SamVerschueren authored and jasnell committed Dec 9, 2021
1 parent 40d0b9d commit b6dbbf1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ let useAtomics : boolean = process.env.PISCINA_DISABLE_ATOMICS !== '1';
let importESMCached : (specifier : string) => Promise<any> | undefined;
function getImportESM () {
if (importESMCached === undefined) {
// eslint-disable-next-line no-new-func
importESMCached = new Function('specifier', 'return import(specifier)') as typeof importESMCached;
}
return importESMCached;
Expand Down

0 comments on commit b6dbbf1

Please sign in to comment.