Skip to content

Commit e199c33

Browse files
committed
tools: no-unassigned-vars
1 parent 68d049c commit e199c33

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

lib/internal/modules/cjs/loader.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1778,8 +1778,6 @@ Module.prototype._compile = function(content, filename, format) {
17781778
}
17791779
}
17801780

1781-
let redirects;
1782-
17831781
let compiledWrapper;
17841782
if (format !== 'module') {
17851783
const result = wrapSafe(filename, content, this, format);
@@ -1795,7 +1793,7 @@ Module.prototype._compile = function(content, filename, format) {
17951793
}
17961794

17971795
const dirname = path.dirname(filename);
1798-
const require = makeRequireFunction(this, redirects);
1796+
const require = makeRequireFunction(this);
17991797
let result;
18001798
const exports = this.exports;
18011799
const thisValue = exports;

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ describe('Module syntax detection', { concurrency: !process.env.TEST_PARALLEL },
147147
}
148148

149149
it('should not hint wrong format in resolve hook', async () => {
150+
// eslint-disable-next-line no-unassigned-vars
150151
let writeSync;
151152
const { stdout, stderr, code, signal } = await spawnPromisified(process.execPath, [
152153
'--no-warnings',

0 commit comments

Comments
 (0)