Skip to content

Commit 10e5620

Browse files
committed
lint
1 parent 77c3d19 commit 10e5620

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

lib/internal/modules/esm/module_job.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ const explainCommonJSGlobalLikeNotDefinedError = (e, url) => {
8282
'- CommonJS error: await is only valid in async functions.',
8383
'- ES Module error: require is not defined in ES module scope.',
8484
'If you meant to use CommonJS, wrap top-level await in async function.',
85-
'If you meant to use ESM, do not use require().'
85+
'If you meant to use ESM, do not use require().',
8686
].join('\n');
8787
e.code = 'ERR_AMBIGUOUS_MODULE_SYNTAX';
8888
return;

test/es-module/test-esm-detect-ambiguous.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ describe('when working with Worker threads', () => {
426426

427427
describe('cjs & esm ambiguous syntax case', async () => {
428428
it('should throw an ambiguous syntax error when using top-level await with require', async () => {
429-
const { stdout, stderr, code, signal } = await spawnPromisified(
429+
const { stderr, code, signal } = await spawnPromisified(
430430
process.execPath,
431431
[
432432
'--input-type=module',

test/es-module/test-esm-undefined-cjs-global-like-variables.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,5 @@ assert.rejects(
3838

3939
assert.rejects(
4040
import('data:text/javascript,require;//.js'),
41-
/^(?:(?!use the '\.cjs' file extension).)*$/s
41+
/^(?:(?!use the '\.cjs' file extension)[\s\S])*$/
4242
).then(common.mustCall());

0 commit comments

Comments
 (0)