Skip to content

Commit 1addfa1

Browse files
committed
fixup!: lint fix
1 parent 8082847 commit 1addfa1

File tree

2 files changed

+19
-20
lines changed

2 files changed

+19
-20
lines changed

lib/internal/modules/esm/resolve.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,8 @@ function legacyMainResolve(packageJSONUrl, packageConfig, base) {
185185

186186
if (typeof packageConfig.main !== 'string') {
187187
throw new ERR_INVALID_PACKAGE_CONFIG(
188-
fileURLToPath(packageJSONUrl), base,
189-
'"main" must be a string', 'main');
188+
fileURLToPath(packageJSONUrl), base,
189+
'"main" must be a string', 'main');
190190
}
191191

192192
const resolvedOption = FSLegacyMainResolve(packageJsonUrlString, packageConfig.main, baseStringified);
Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,23 @@
11
'use strict';
22

3-
const {spawnPromisified} = require('../common');
3+
const { spawnPromisified } = require('../common');
44
const fixtures = require('../common/fixtures.js');
55
const assert = require('node:assert');
6-
const path = require('node:path');
7-
const {execPath} = require('node:process');
8-
const {describe, it} = require('node:test');
6+
const { execPath } = require('node:process');
7+
const { describe, it } = require('node:test');
98

10-
describe('Import empty module', {concurrency: true}, () => {
11-
it(async () => {
12-
const {code, signal, stdout, stderr} = await spawnPromisified(execPath, [
13-
'--no-warnings',
14-
'--eval',
15-
'import("empty")',
16-
], {
17-
cwd: fixtures.path(),
18-
});
19-
assert.strictEqual(code, 1);
20-
assert.strictEqual(signal, null);
21-
assert.strictEqual(stdout, '');
22-
assert.match(stderr, /Error \[ERR_INVALID_PACKAGE_CONFIG]: Invalid package config/);
9+
describe('Import empty module', { concurrency: true }, () => {
10+
it(async () => {
11+
const { code, signal, stdout, stderr } = await spawnPromisified(execPath, [
12+
'--no-warnings',
13+
'--eval',
14+
'import("empty")',
15+
], {
16+
cwd: fixtures.path(),
2317
});
24-
})
18+
assert.strictEqual(code, 1);
19+
assert.strictEqual(signal, null);
20+
assert.strictEqual(stdout, '');
21+
assert.match(stderr, /Error \[ERR_INVALID_PACKAGE_CONFIG]: Invalid package config/);
22+
});
23+
});

0 commit comments

Comments
 (0)