Skip to content

Commit 94afcae

Browse files
committed
fix lint errors
1 parent 52d276e commit 94afcae

File tree

4 files changed

+9
-11
lines changed

4 files changed

+9
-11
lines changed

lib/internal/modules/esm/load.js

-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ async function defaultLoad(url, context = kEmptyObject) {
107107
/**
108108
* throws an error if the protocol is not one of the protocols
109109
* that can be loaded in the default loader
110-
*
111110
* @param {URL} parsed
112111
* @param {boolean} experimentalNetworkImports
113112
*/

lib/internal/modules/esm/resolve.js

-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
const {
44
ArrayIsArray,
55
ArrayPrototypeJoin,
6-
ArrayPrototypePush,
76
ArrayPrototypeShift,
87
JSONStringify,
98
ObjectGetOwnPropertyNames,
@@ -51,7 +50,6 @@ const {
5150
ERR_PACKAGE_PATH_NOT_EXPORTED,
5251
ERR_UNSUPPORTED_DIR_IMPORT,
5352
ERR_NETWORK_IMPORT_DISALLOWED,
54-
ERR_UNSUPPORTED_ESM_URL_SCHEME,
5553
} = require('internal/errors').codes;
5654

5755
const { Module: CJSModule } = require('internal/modules/cjs/loader');

test/es-module/test-esm-import-meta-resolve.mjs

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ assert.strictEqual(
3030
code: 'ERR_INVALID_ARG_TYPE',
3131
})
3232
);
33-
assert.equal(import.meta.resolve('http://some-absolute/url'), 'http://some-absolute/url')
34-
assert.equal(import.meta.resolve('some://weird/protocol'), 'some://weird/protocol')
33+
assert.strictEqual(import.meta.resolve('http://some-absolute/url'), 'http://some-absolute/url');
34+
assert.strictEqual(import.meta.resolve('some://weird/protocol'), 'some://weird/protocol');
3535
assert.strictEqual(import.meta.resolve('baz/', fixtures),
3636
fixtures + 'node_modules/baz/');
3737

test/es-module/test-esm-loader-default-resolver.mjs

+7-6
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ import { spawnPromisified } from '../common/index.mjs';
22
import * as fixtures from '../common/fixtures.mjs';
33
import assert from 'node:assert';
44
import { execPath } from 'node:process';
5-
import {describe, it} from 'node:test'
5+
import { describe, it } from 'node:test';
66

77
describe('default resolver', () => {
88
it('should accept foreign schemas without exception (e.g. uyyt://something/or-other', async () => {
9-
const { code, signal, stdout, stderr } = await spawnPromisified(execPath, [
9+
const { code, stdout, stderr } = await spawnPromisified(execPath, [
1010
'--no-warnings',
1111
'--experimental-loader',
1212
fixtures.fileURL('/es-module-loaders/uyyt-dummy-loader.mjs'),
@@ -15,9 +15,10 @@ describe('default resolver', () => {
1515
assert.strictEqual(code, 0);
1616
assert.strictEqual(stdout.trim(), 'index.mjs!');
1717
assert.strictEqual(stderr, '');
18-
})
18+
});
19+
1920
it('should resolve foreign schemas by doing regular url absolutization', async () => {
20-
const { code, signal, stdout, stderr } = await spawnPromisified(execPath, [
21+
const { code, stdout, stderr } = await spawnPromisified(execPath, [
2122
'--no-warnings',
2223
'--experimental-loader',
2324
fixtures.fileURL('/es-module-loaders/uyyt-dummy-loader.mjs'),
@@ -26,5 +27,5 @@ describe('default resolver', () => {
2627
assert.strictEqual(code, 0);
2728
assert.strictEqual(stdout.trim(), '42');
2829
assert.strictEqual(stderr, '');
29-
})
30-
})
30+
});
31+
});

0 commit comments

Comments
 (0)