Skip to content

Commit

Permalink
style: linting
Browse files Browse the repository at this point in the history
  • Loading branch information
antongolub committed May 4, 2024
1 parent 76f7adf commit 0cb5c1e
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions scripts/build-js.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,11 @@ plugins.push(
hooks: [
{
on: 'end',
pattern: new RegExp('(' + entryPoints.map(e => path.parse(e).name).join('|') + ')\\.cjs$'),
pattern: new RegExp(
'(' +
entryPoints.map((e) => path.parse(e).name).join('|') +
')\\.cjs$'
),
transform(contents) {
return contents
.toString()
Expand All @@ -97,7 +101,10 @@ plugins.push(
)
.replaceAll('require("fs/promises")', 'require("fs").promises')
.replaceAll('}).prototype', '}).prototype || {}')
.replace(/\/\/ Annotate the CommonJS export names for ESM import in node:/, ($0) => `/* c8 ignore next 100 */\n${$0}`)
.replace(
/\/\/ Annotate the CommonJS export names for ESM import in node:/,
($0) => `/* c8 ignore next 100 */\n${$0}`
)
},
},
],
Expand Down

0 comments on commit 0cb5c1e

Please sign in to comment.