Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
108 commits
Select commit Hold shift + click to select a range
9852ebc
http: do not loop over prototype in Agent
targos Dec 6, 2020
040b39f
tools: enable no-unused-expressions lint rule
targos Nov 24, 2020
deaafd5
dns: refactor to use more primordials
aduh95 Nov 20, 2020
6a6b3af
doc: provide more context on techinical values
mhdawson Nov 20, 2020
166aa8a
test: fix child-process-pipe-dataflow
santigimeno Dec 3, 2020
d3d1f33
test: add SIGTRAP to test-signal-handler
Dec 3, 2020
023291b
test: check null proto-of-proto in util.inspect()
Trott Dec 5, 2020
169406b
src: add missing context scopes
addaleax Dec 6, 2020
8ecf2f9
tools: update doc tool dependencies
targos Dec 6, 2020
3341b2c
doc: document ABORT_ERR code
benjamingr Nov 29, 2020
02afe58
src: use using declarations consistently
danbev Dec 3, 2020
210390f
src: remove identical V macro
danbev Dec 7, 2020
2a60e3b
src: fix indentation in memory_tracker-inl.h
danbev Dec 7, 2020
31b062d
test: fix flaky test-repl
Trott Dec 6, 2020
5929b08
deps: upgrade npm to 7.1.0
ruyadorno Dec 4, 2020
04f1663
doc: add RaisinTen as a triager
RaisinTen Dec 6, 2020
26f8ccf
tools: update ESLint to 7.15.0
cjihrig Dec 6, 2020
7542a3b
tools: enable no-unsafe-optional-chaining lint rule
cjihrig Dec 6, 2020
e331de2
doc: reword POSIX threads text in addons.md
Trott Dec 7, 2020
dd705ad
test: increase execFile abort coverage
shootermv Dec 7, 2020
e46a46a
inspector: refactor to use more primordials
aduh95 Nov 21, 2020
6ecbc1d
stream: support abortsignal in constructor
benjamingr Dec 7, 2020
129053f
doc: update terminology
mhdawson Dec 10, 2020
1330995
build,lib,test: change whitelist to allowlist
targos Dec 6, 2020
e597882
src: add typedef for CleanupHookCallback callback
danbev Dec 8, 2020
4f3d7bb
src: introduce convenience node::MakeSyncCallback()
nicstange Nov 29, 2020
e2ced0d
perf_hooks: invoke performance_entry_callback via MakeSyncCallback()
nicstange Nov 29, 2020
f368d69
Revert "perf_hooks: make PerformanceObserver an AsyncResource"
nicstange Nov 29, 2020
0f749a3
test: add test for async contexts in PerformanceObserver
ZauberNerd Dec 2, 2020
c6e65d0
tools: update ini in tools/node-lint-md-cli-rollup
MylesBorins Dec 10, 2020
0baa610
deps: upgrade npm to 7.1.1
ruyadorno Dec 9, 2020
e233094
src: allow preventing SetPrepareStackTraceCallback
codebytere Dec 8, 2020
62bfe3d
doc: note v15.0.0 changed default --unhandled-rejections=throw
kaizhu256 Dec 3, 2020
e449571
child_process: add signal support to spawn
benjamingr Dec 7, 2020
13d6597
util: fix module prefixes during inspection
BridgeAR Nov 19, 2020
cc544db
util: fix instanceof checks with null prototypes during inspection
BridgeAR Nov 19, 2020
30fe0ff
deps: upgrade npm to 7.1.2
darcyclarke Dec 11, 2020
58319d5
tls: forward new SecureContext options
mildsunrise Dec 6, 2020
acd78d9
test: increased externalized string length
codebytere Dec 9, 2020
9891811
doc: edit addon text about event loop blocking
Trott Dec 8, 2020
56fe9ba
worker: refactor MessagePort entanglement management
addaleax Dec 1, 2020
96c095f
src: guard against env != null in node_errors.cc
addaleax Dec 6, 2020
21fbcb6
deps: V8: backport 4bf051d536a1
addaleax Dec 11, 2020
5ff7f42
src: use correct outer Context’s microtask queue
addaleax Dec 8, 2020
f7635fd
test: make executable name more general
codebytere Dec 12, 2020
1b4984d
src: remove duplicate V macros in node_v8.cc
danbev Dec 9, 2020
fa40366
util: simplify constructor retrieval in inspect()
Trott Dec 10, 2020
d299cee
test: increase coverage for net/blocklist
Lxxyx Dec 6, 2020
1ec8516
doc: add PoojaDurgad to collaborators
PoojaDurgad Dec 14, 2020
20ecc82
worker: fix broadcast channel SharedArrayBuffer passing
addaleax Dec 13, 2020
25a2454
doc: add v15.4.0 link to CHANGELOG.md
danielleadams Dec 9, 2020
584ea8b
build: fix make test-npm
ruyadorno Dec 3, 2020
22f0393
doc: revise addon mulitple initializations text
Trott Dec 9, 2020
9f2d3c2
test: remove test-http2-client-upload as flaky
Trott Dec 12, 2020
728f512
lib: make safe primordials safe to iterate
aduh95 Dec 4, 2020
d8b5b94
stream: accept iterable as a valid first argument
Lxxyx Dec 11, 2020
68687d3
src: remove empty name check in node_env_var.cc
RaisinTen Nov 16, 2020
109ab78
test: increase coverage for fs/dir read
Lxxyx Dec 4, 2020
7a34452
doc: add license info to the README
iam-frankqiu Nov 26, 2020
c3ec90d
doc: make explicit reverting node_version.h changes
richardlau Dec 9, 2020
81e603b
test: specify global object for globals
Trott Dec 13, 2020
cb4652e
deps: update to c-ares 1.17.1
lxdicted Nov 21, 2020
f09985d
doc: update url.md
aarock1234 Nov 17, 2020
eb29a16
doc: add issue reference to github pr template
chinmoy12c Dec 8, 2020
7b8d373
tools: lint shell scripts
aduh95 Nov 10, 2020
b0393fa
deps: upgrade npm to 7.2.0
MylesBorins Dec 16, 2020
752c94d
deps: fix npm doctor tests for pre-release node
nlf Dec 15, 2020
1f43aad
deps: update patch and docs for openssl update
MylesBorins Dec 14, 2020
27fb651
deps: upgrade openssl sources to 1.1.1i
MylesBorins Dec 14, 2020
309e297
deps: various quic patches from akamai/openssl
tmshort Apr 12, 2019
5b49807
deps: re-enable OPENSSL_NO_QUIC guards
jasnell Jun 24, 2020
b6a31f0
deps: update archs files for OpenSSL-1.1.1i
MylesBorins Dec 15, 2020
7efb311
src: remove unnecessary ToLocalChecked call
danbev Dec 15, 2020
25d7e90
http: use `autoDestroy: true` in incoming message
dnlup May 19, 2020
397e31e
http: reafactor incoming message destroy
dnlup Nov 24, 2020
4b81d79
http: fix lint error in incoming message
dnlup Dec 9, 2020
f11a648
http: add comments in _http_incoming
dnlup Dec 9, 2020
60b5e69
http: remove trailing space
dnlup Dec 11, 2020
36b4ddd
http: use standard args order in IncomingMEssage onError
dnlup Dec 11, 2020
213dcd7
http: add test for incomingmessage destroy
dnlup Dec 16, 2020
9830fe5
doc: move Derek Lewis to emeritus
Trott Dec 14, 2020
c6700ad
tools: remove unused variable in configure.py
Trott Dec 15, 2020
27260c7
tools: fix release script
aduh95 Dec 16, 2020
ad75c78
doc: add note about timingSafeEqual for TypedArray
tniessen Nov 30, 2020
149f2cf
doc: add two tips for speeding the dev builds
mmomtchev Dec 9, 2020
9fc2479
test: increase coverage for worker
Lxxyx Dec 12, 2020
95c80f5
build: run some workflows only on nodejs/node
targos Dec 14, 2020
3f33d0b
stream: fix pipe deadlock when starting with needDrain
ronag Dec 18, 2020
7c903ec
repl: disable blocking completions by default
addaleax Dec 18, 2020
bbc0d14
src: use correct microtask queue for checkpoints
addaleax Dec 19, 2020
e1f00fd
benchmark: reduce code duplication
Trott Dec 18, 2020
f3828c9
tools: fix update-eslint.sh
Dec 19, 2020
0d4d347
tools: update ESLint to 7.16.0
Dec 19, 2020
dc8d1a7
deps: upgrade npm to 7.3.0
ruyadorno Dec 18, 2020
c5602fb
doc: simplify worker_threads.md text
Trott Dec 17, 2020
e3c5adc
tools: fix release script sign function
aduh95 Dec 18, 2020
e30af7b
fs: refactor to use optional chaining
Lxxyx Dec 15, 2020
5481be8
lib: support BigInt in querystring.stringify
RaisinTen Dec 13, 2020
a1ba668
doc: add remark about Collaborators discussion page
iam-frankqiu Dec 7, 2020
9fbab3e
doc: update and run license-builder for Babel
targos Dec 14, 2020
82a2626
build: do not run GitHub actions for draft PRs
targos Nov 1, 2020
036ed1f
src: add way to get IsolateData and allocator from Environment
addaleax Dec 8, 2020
19c2332
doc: fix AbortSignal example for stream.Readable
targos Dec 22, 2020
d38a0ec
src: remove unnecessary ToLocalChecked node_errors
danbev Dec 17, 2020
22ac227
test: increase coverage for stream
Lxxyx Dec 16, 2020
ecbb757
tools: fix make-v8.sh
richardlau Dec 21, 2020
01576fb
test: increase abort logic coverage
shootermv Dec 18, 2020
f978628
2020-12-22, Version 15.5.0 (Current)
targos Dec 21, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
tools: enable no-unused-expressions lint rule
Fixes: #36246

PR-URL: #36248
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
targos committed Dec 21, 2020
commit 040b39f076d8169fc51c14282b95d2a1b4ec57a9
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ module.exports = {
'no-unreachable': 'error',
'no-unsafe-finally': 'error',
'no-unsafe-negation': 'error',
'no-unused-expressions': ['error', { allowShortCircuit: true }],
'no-unused-labels': 'error',
'no-unused-vars': ['error', { args: 'none', caughtErrors: 'all' }],
'no-use-before-define': ['error', {
Expand Down
1 change: 0 additions & 1 deletion benchmark/_benchmark_progress.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ class BenchmarkProgress {
this.completedConfig = 0;
// Total number of configurations for the current file
this.scheduledConfig = 0;
this.interval; // Updates the elapsed time.
}

startQueue(index) {
Expand Down
6 changes: 4 additions & 2 deletions benchmark/es/destructuring-bench.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ function runSwapManual(n) {
let x, y, r;
bench.start();
for (let i = 0; i < n; i++) {
x = 1, y = 2;
x = 1;
y = 2;
r = x;
x = y;
y = r;
Expand All @@ -26,7 +27,8 @@ function runSwapDestructured(n) {
let x, y;
bench.start();
for (let i = 0; i < n; i++) {
x = 1, y = 2;
x = 1;
y = 2;
[x, y] = [y, x];
assert.strictEqual(x, 2);
assert.strictEqual(y, 1);
Expand Down
2 changes: 1 addition & 1 deletion benchmark/perf_hooks/bench-eventlooputil.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function main({ method, n }) {
function benchIdleTime(n) {
bench.start();
for (let i = 0; i < n; i++)
nodeTiming.idleTime;
nodeTiming.idleTime; // eslint-disable-line no-unused-expressions
bench.end(n);
}

Expand Down
4 changes: 2 additions & 2 deletions benchmark/process/bench-env.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function main({ n, operation }) {
case 'get':
bench.start();
for (let i = 0; i < n; i++) {
process.env.PATH;
process.env.PATH; // eslint-disable-line no-unused-expressions
}
bench.end(n);
break;
Expand Down Expand Up @@ -42,7 +42,7 @@ function main({ n, operation }) {
case 'query':
bench.start();
for (let i = 0; i < n; i++) {
'PATH' in process.env;
'PATH' in process.env; // eslint-disable-line no-unused-expressions
}
bench.end(n);
break;
Expand Down
3 changes: 1 addition & 2 deletions benchmark/string_decoder/string-decoder-create.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ const bench = common.createBenchmark(main, {
function main({ encoding, n }) {
bench.start();
for (let i = 0; i < n; ++i) {
const sd = new StringDecoder(encoding);
!!sd.encoding;
new StringDecoder(encoding);
}
bench.end(n);
}
1 change: 1 addition & 0 deletions doc/.eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ rules:
# ease some restrictions in doc examples
no-restricted-properties: off
no-undef: off
no-unused-expressions: off
no-unused-vars: off
symbol-description: off

Expand Down
2 changes: 1 addition & 1 deletion lib/internal/assert/assertion_error.js
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ class AssertionError extends Error {
}
ErrorCaptureStackTrace(this, stackStartFn || stackStartFunction);
// Create error message including the error code in the name.
this.stack;
this.stack; // eslint-disable-line no-unused-expressions
// Reset the name.
this.name = 'AssertionError';
}
Expand Down
24 changes: 12 additions & 12 deletions lib/internal/buffer.js
Original file line number Diff line number Diff line change
Expand Up @@ -952,18 +952,18 @@ function writeFloatBackwards(val, offset = 0) {
class FastBuffer extends Uint8Array {}

function addBufferPrototypeMethods(proto) {
proto.readBigUInt64LE = readBigUInt64LE,
proto.readBigUInt64BE = readBigUInt64BE,
proto.readBigUint64LE = readBigUInt64LE,
proto.readBigUint64BE = readBigUInt64BE,
proto.readBigInt64LE = readBigInt64LE,
proto.readBigInt64BE = readBigInt64BE,
proto.writeBigUInt64LE = writeBigUInt64LE,
proto.writeBigUInt64BE = writeBigUInt64BE,
proto.writeBigUint64LE = writeBigUInt64LE,
proto.writeBigUint64BE = writeBigUInt64BE,
proto.writeBigInt64LE = writeBigInt64LE,
proto.writeBigInt64BE = writeBigInt64BE,
proto.readBigUInt64LE = readBigUInt64LE;
proto.readBigUInt64BE = readBigUInt64BE;
proto.readBigUint64LE = readBigUInt64LE;
proto.readBigUint64BE = readBigUInt64BE;
proto.readBigInt64LE = readBigInt64LE;
proto.readBigInt64BE = readBigInt64BE;
proto.writeBigUInt64LE = writeBigUInt64LE;
proto.writeBigUInt64BE = writeBigUInt64BE;
proto.writeBigUint64LE = writeBigUInt64LE;
proto.writeBigUint64BE = writeBigUInt64BE;
proto.writeBigInt64LE = writeBigInt64LE;
proto.writeBigInt64BE = writeBigInt64BE;

proto.readUIntLE = readUIntLE;
proto.readUInt32LE = readUInt32LE;
Expand Down
8 changes: 4 additions & 4 deletions lib/internal/errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ function addCodeToName(err, name, code) {
err.name = `${name} [${code}]`;
// Access the stack to generate the error message including the error code
// from the name.
err.stack;
err.stack; // eslint-disable-line no-unused-expressions
// Reset the name to the actual name.
if (name === 'SystemError') {
ObjectDefineProperty(err, 'name', {
Expand Down Expand Up @@ -1411,11 +1411,11 @@ E('ERR_TLS_CERT_ALTNAME_INVALID', function(reason, host, cert) {
}, Error);
E('ERR_TLS_DH_PARAM_SIZE', 'DH parameter size %s is less than 2048', Error);
E('ERR_TLS_HANDSHAKE_TIMEOUT', 'TLS handshake timeout', Error);
E('ERR_TLS_INVALID_CONTEXT', '%s must be a SecureContext', TypeError),
E('ERR_TLS_INVALID_STATE', 'TLS socket connection must be securely established',
Error),
E('ERR_TLS_INVALID_CONTEXT', '%s must be a SecureContext', TypeError);
E('ERR_TLS_INVALID_PROTOCOL_VERSION',
'%j is not a valid %s TLS protocol version', TypeError);
E('ERR_TLS_INVALID_STATE', 'TLS socket connection must be securely established',
Error);
E('ERR_TLS_PROTOCOL_VERSION_CONFLICT',
'TLS protocol version %j conflicts with secureProtocol %j', TypeError);
E('ERR_TLS_RENEGOTIATION_DISABLED',
Expand Down
6 changes: 3 additions & 3 deletions lib/internal/streams/destroy.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const kConstruct = Symbol('kConstruct');
function checkError(err, w, r) {
if (err) {
// Avoid V8 leak, https://github.com/nodejs/node/pull/34103#issuecomment-652002364
err.stack;
err.stack; // eslint-disable-line no-unused-expressions

if (w && !w.errored) {
w.errored = err;
Expand Down Expand Up @@ -118,7 +118,7 @@ function _destroy(self, err, cb) {
function(err) {
const r = self._readableState;
const w = self._writableState;
err.stack;
err.stack; // eslint-disable-line no-unused-expressions

called = true;

Expand Down Expand Up @@ -237,7 +237,7 @@ function errorOrDestroy(stream, err, sync) {
stream.destroy(err);
else if (err) {
// Avoid V8 leak, https://github.com/nodejs/node/pull/34103#issuecomment-652002364
err.stack;
err.stack; // eslint-disable-line no-unused-expressions

if (w && !w.errored) {
w.errored = err;
Expand Down
2 changes: 1 addition & 1 deletion lib/internal/streams/writable.js
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ function onwrite(stream, er) {

if (er) {
// Avoid V8 leak, https://github.com/nodejs/node/pull/34103#issuecomment-652002364
er.stack;
er.stack; // eslint-disable-line no-unused-expressions

if (!state.errored) {
state.errored = er;
Expand Down
2 changes: 1 addition & 1 deletion test/common/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ function getCallSite(top) {
const err = new Error();
Error.captureStackTrace(err, top);
// With the V8 Error API, the stack is not formatted until it is accessed
err.stack;
err.stack; // eslint-disable-line no-unused-expressions
Error.prepareStackTrace = originalStackFormatter;
return err.stack;
}
Expand Down
2 changes: 1 addition & 1 deletion test/js-native-api/test_general/testEnvCleanup.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ if (process.argv[2] === 'child') {
// Make sure that only the latest attached version of a re-wrapped item's
// finalizer gets called at env cleanup.
module.exports['first wrap'] =
test_general.envCleanupWrap({}, finalizerMessages['first wrap']),
test_general.envCleanupWrap({}, finalizerMessages['first wrap']);
test_general.removeWrap(module.exports['first wrap']);
test_general.envCleanupWrap(module.exports['first wrap'],
finalizerMessages['second wrap']);
Expand Down
2 changes: 1 addition & 1 deletion test/message/nexttick_throw.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ process.nextTick(function() {
process.nextTick(function() {
process.nextTick(function() {
process.nextTick(function() {
// eslint-disable-next-line no-undef
// eslint-disable-next-line no-undef,no-unused-expressions
undefined_reference_error_maker;
});
});
Expand Down
2 changes: 1 addition & 1 deletion test/message/timeout_throw.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@
require('../common');

setTimeout(function() {
// eslint-disable-next-line no-undef
// eslint-disable-next-line no-undef,no-unused-expressions
undefined_reference_error_maker;
}, 1);
5 changes: 3 additions & 2 deletions test/parallel/test-accessor-properties.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const UDP = internalBinding('udp_wrap').UDP;
{
// Should throw instead of raise assertions
assert.throws(() => {
UDP.prototype.fd;
UDP.prototype.fd; // eslint-disable-line no-unused-expressions
}, TypeError);

const StreamWrapProto = Object.getPrototypeOf(TTY.prototype);
Expand All @@ -26,7 +26,7 @@ const UDP = internalBinding('udp_wrap').UDP;
properties.forEach((property) => {
// Should throw instead of raise assertions
assert.throws(() => {
TTY.prototype[property];
TTY.prototype[property]; // eslint-disable-line no-unused-expressions
}, TypeError, `Missing expected TypeError for TTY.prototype.${property}`);

// Should not throw for Object.getOwnPropertyDescriptor
Expand All @@ -42,6 +42,7 @@ const UDP = internalBinding('udp_wrap').UDP;
const crypto = internalBinding('crypto');

assert.throws(() => {
// eslint-disable-next-line no-unused-expressions
crypto.SecureContext.prototype._external;
}, TypeError);

Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-buffer-backing-arraybuffer.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ for (const { length, expectOnHeap } of tests) {
`for ${array.constructor.name}, length = ${length}`);

// Consistency check: Accessing .buffer should create it.
array.buffer;
array.buffer; // eslint-disable-line no-unused-expressions
assert(arrayBufferViewHasBuffer(array));
}
}
2 changes: 1 addition & 1 deletion test/parallel/test-buffer-constructor-deprecation-error.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ process.on('warning', common.mustCall());

Error.prepareStackTrace = (err, trace) => new Buffer(10);

new Error().stack;
new Error().stack; // eslint-disable-line no-unused-expressions
2 changes: 1 addition & 1 deletion test/parallel/test-buffer-fakes.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ assert.throws(function() {
}, TypeError);

assert.throws(function() {
+Buffer.prototype;
+Buffer.prototype; // eslint-disable-line no-unused-expressions
}, TypeError);

assert.throws(function() {
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-child-process-stdin-ipc.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const spawn = require('child_process').spawn;

if (process.argv[2] === 'child') {
// Just reference stdin, it should start it
process.stdin;
process.stdin; // eslint-disable-line no-unused-expressions
return;
}

Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-dgram-deprecation-error.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const propertyCases = propertiesToTest.map((propName) => {
`Socket.prototype.${propName} is deprecated`,
'DEP0112'
);
sock[propName];
sock[propName]; // eslint-disable-line no-unused-expressions
},
() => {
// Test property setter
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-disable-proto-throw.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const { Worker, isMainThread } = require('worker_threads');
assert(Object.prototype.hasOwnProperty('__proto__'));

assert.throws(() => {
// eslint-disable-next-line no-proto
// eslint-disable-next-line no-proto,no-unused-expressions
({}).__proto__;
}, {
code: 'ERR_PROTO_ACCESS'
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-error-prepare-stack-trace.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const assert = require('assert');
try {
throw new Error('foo');
} catch (err) {
err.stack;
err.stack; // eslint-disable-line no-unused-expressions
}
assert(prepareCalled);
}
2 changes: 1 addition & 1 deletion test/parallel/test-fs-readv-promises.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function getFileName() {
const allocateEmptyBuffers = (combinedLength) => {
const bufferArr = [];
// Allocate two buffers, each half the size of exptectedBuff
bufferArr[0] = Buffer.alloc(Math.floor(combinedLength / 2)),
bufferArr[0] = Buffer.alloc(Math.floor(combinedLength / 2));
bufferArr[1] = Buffer.alloc(combinedLength - bufferArr[0].length);

return bufferArr;
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-fs-readv-sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ fs.writeFileSync(filename, exptectedBuff);
const allocateEmptyBuffers = (combinedLength) => {
const bufferArr = [];
// Allocate two buffers, each half the size of exptectedBuff
bufferArr[0] = Buffer.alloc(Math.floor(combinedLength / 2)),
bufferArr[0] = Buffer.alloc(Math.floor(combinedLength / 2));
bufferArr[1] = Buffer.alloc(combinedLength - bufferArr[0].length);

return bufferArr;
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-fs-readv.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const exptectedBuff = Buffer.from(expected);
const allocateEmptyBuffers = (combinedLength) => {
const bufferArr = [];
// Allocate two buffers, each half the size of exptectedBuff
bufferArr[0] = Buffer.alloc(Math.floor(combinedLength / 2)),
bufferArr[0] = Buffer.alloc(Math.floor(combinedLength / 2));
bufferArr[1] = Buffer.alloc(combinedLength - bufferArr[0].length);

return bufferArr;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ common.expectWarning('DeprecationWarning', warn, 'DEP0066');
{
// Tests for _headerNames get method
const outgoingMessage = new OutgoingMessage();
outgoingMessage._headerNames;
outgoingMessage._headerNames; // eslint-disable-line no-unused-expressions
}
2 changes: 1 addition & 1 deletion test/parallel/test-http-outgoing-internal-headers.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ common.expectWarning('DeprecationWarning', warn, 'DEP0066');
// Tests for _headers get method
const outgoingMessage = new OutgoingMessage();
outgoingMessage.getHeaders = common.mustCall();
outgoingMessage._headers;
outgoingMessage._headers; // eslint-disable-line no-unused-expressions
}

{
Expand Down
7 changes: 4 additions & 3 deletions test/parallel/test-http-same-map.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,10 @@ onresponse.responses = [];

function allSame(list) {
assert(list.length >= 2);
// Use |elt| in no-op position to pacify eslint.
for (const elt of list) elt, eval('%DebugPrint(elt)');
for (const elt of list) elt, assert(eval('%HaveSameMap(list[0], elt)'));
// eslint-disable-next-line no-unused-vars
for (const elt of list) eval('%DebugPrint(elt)');
// eslint-disable-next-line no-unused-vars
for (const elt of list) assert(eval('%HaveSameMap(list[0], elt)'));
}

process.on('exit', () => {
Expand Down
3 changes: 2 additions & 1 deletion test/parallel/test-http2-unbound-socket-proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ server.listen(0, common.mustCall(() => {
// informative error.
setImmediate(common.mustCall(() => {
assert.throws(() => {
socket.example;
socket.example; // eslint-disable-line no-unused-expressions
}, {
code: 'ERR_HTTP2_SOCKET_UNBOUND'
});
Expand All @@ -36,6 +36,7 @@ server.listen(0, common.mustCall(() => {
code: 'ERR_HTTP2_SOCKET_UNBOUND'
});
assert.throws(() => {
// eslint-disable-next-line no-unused-expressions
socket instanceof net.Socket;
}, {
code: 'ERR_HTTP2_SOCKET_UNBOUND'
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-inspector-tracing-domain.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function post(message, data) {
function generateTrace() {
return new Promise((resolve) => setTimeout(() => {
for (let i = 0; i < 1000000; i++) {
'test' + i;
'test' + i; // eslint-disable-line no-unused-expressions
}
resolve();
}, 1));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ session.post('Runtime.evaluate', {
expression: 'a',
throwOnSideEffect: true,
contextId: 2 // context's id
}, common.mustCall((error, res) => {
assert.ifError(error),
}, common.mustSucceed((res) => {
assert.deepStrictEqual(res, {
result: {
type: 'number',
Expand Down
Loading