GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — tools: enable no-unused-expressions lint rule · moander/node@bf31d3c

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • .eslintrc.js
  • benchmark
    • _benchmark_progress.js
    • es
      • destructuring-bench.js
    • perf_hooks
      • bench-eventlooputil.js
    • process
      • bench-env.js
    • string_decoder
      • string-decoder-create.js
  • doc
    • .eslintrc.yaml
  • lib/internal
    • assert
      • assertion_error.js
    • buffer.js
    • errors.js
    • streams
      • destroy.js
      • writable.js
  • test
    • common
      • index.js
    • js-native-api/test_general
      • testEnvCleanup.js
    • message
      • nexttick_throw.js
      • timeout_throw.js
    • parallel
      • test-accessor-properties.js
      • test-buffer-backing-arraybuffer.js
      • test-buffer-constructor-deprecation-error.js
      • test-buffer-fakes.js
      • test-child-process-stdin-ipc.js
      • test-dgram-deprecation-error.js
      • test-disable-proto-throw.js
      • test-error-prepare-stack-trace.js
      • test-fs-readv-promises.js
      • test-fs-readv-sync.js
      • test-fs-readv.js
      • test-http-outgoing-internal-headernames-getter.js
      • test-http-outgoing-internal-headers.js
      • test-http-same-map.js
      • test-http2-unbound-socket-proxy.js
      • test-inspector-tracing-domain.js
      • test-inspector-vm-global-accessors-sideeffects.js
      • test-internal-iterable-weak-map.js
      • test-net-after-close.js
      • test-net-during-close.js
      • test-process-env-windows-error-reset.js
      • test-repl-options.js
      • test-repl-tab-complete.js
      • test-source-map-api.js
      • test-stdin-hang.js
      • test-stdio-closed.js
      • test-stdio-pipe-access.js
      • test-stream-pipeline-uncaught.js
      • test-stream-pipeline.js
      • test-stream-readable-async-iterators.js
      • test-tls-external-accessor.js
      • test-trace-events-bootstrap.js
      • test-trace-events-environment.js
      • test-vm-module-errors.js
      • test-worker-unsupported-things.js

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎.eslintrc.js‎

Copy file name to clipboardExpand all lines: .eslintrc.js
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,7 @@ module.exports = {
234234
'no-unreachable': 'error',
235235
'no-unsafe-finally': 'error',
236236
'no-unsafe-negation': 'error',
237+
'no-unused-expressions': ['error', { allowShortCircuit: true }],
237238
'no-unused-labels': 'error',
238239
'no-unused-vars': ['error', { args: 'none', caughtErrors: 'all' }],
239240
'no-use-before-define': ['error', {
Collapse file

‎benchmark/_benchmark_progress.js‎

Copy file name to clipboardExpand all lines: benchmark/_benchmark_progress.js
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ class BenchmarkProgress {
3939
this.completedConfig = 0;
4040
// Total number of configurations for the current file
4141
this.scheduledConfig = 0;
42-
this.interval; // Updates the elapsed time.
4342
}
4443

4544
startQueue(index) {
Collapse file

‎benchmark/es/destructuring-bench.js‎

Copy file name to clipboardExpand all lines: benchmark/es/destructuring-bench.js
+4-2Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ function runSwapManual(n) {
1212
let x, y, r;
1313
bench.start();
1414
for (let i = 0; i < n; i++) {
15-
x = 1, y = 2;
15+
x = 1;
16+
y = 2;
1617
r = x;
1718
x = y;
1819
y = r;
@@ -26,7 +27,8 @@ function runSwapDestructured(n) {
2627
let x, y;
2728
bench.start();
2829
for (let i = 0; i < n; i++) {
29-
x = 1, y = 2;
30+
x = 1;
31+
y = 2;
3032
[x, y] = [y, x];
3133
assert.strictEqual(x, 2);
3234
assert.strictEqual(y, 1);
Collapse file

‎benchmark/perf_hooks/bench-eventlooputil.js‎

Copy file name to clipboardExpand all lines: benchmark/perf_hooks/bench-eventlooputil.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function main({ method, n }) {
3333
function benchIdleTime(n) {
3434
bench.start();
3535
for (let i = 0; i < n; i++)
36-
nodeTiming.idleTime;
36+
nodeTiming.idleTime; // eslint-disable-line no-unused-expressions
3737
bench.end(n);
3838
}
3939

Collapse file

‎benchmark/process/bench-env.js‎

Copy file name to clipboardExpand all lines: benchmark/process/bench-env.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function main({ n, operation }) {
1313
case 'get':
1414
bench.start();
1515
for (let i = 0; i < n; i++) {
16-
process.env.PATH;
16+
process.env.PATH; // eslint-disable-line no-unused-expressions
1717
}
1818
bench.end(n);
1919
break;
@@ -42,7 +42,7 @@ function main({ n, operation }) {
4242
case 'query':
4343
bench.start();
4444
for (let i = 0; i < n; i++) {
45-
'PATH' in process.env;
45+
'PATH' in process.env; // eslint-disable-line no-unused-expressions
4646
}
4747
bench.end(n);
4848
break;
Collapse file

‎benchmark/string_decoder/string-decoder-create.js‎

Copy file name to clipboardExpand all lines: benchmark/string_decoder/string-decoder-create.js
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ const bench = common.createBenchmark(main, {
1212
function main({ encoding, n }) {
1313
bench.start();
1414
for (let i = 0; i < n; ++i) {
15-
const sd = new StringDecoder(encoding);
16-
!!sd.encoding;
15+
new StringDecoder(encoding);
1716
}
1817
bench.end(n);
1918
}
Collapse file

‎doc/.eslintrc.yaml‎

Copy file name to clipboardExpand all lines: doc/.eslintrc.yaml
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ rules:
44
# ease some restrictions in doc examples
55
no-restricted-properties: off
66
no-undef: off
7+
no-unused-expressions: off
78
no-unused-vars: off
89
symbol-description: off
910

Collapse file

‎lib/internal/assert/assertion_error.js‎

Copy file name to clipboardExpand all lines: lib/internal/assert/assertion_error.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ class AssertionError extends Error {
455455
}
456456
ErrorCaptureStackTrace(this, stackStartFn || stackStartFunction);
457457
// Create error message including the error code in the name.
458-
this.stack;
458+
this.stack; // eslint-disable-line no-unused-expressions
459459
// Reset the name.
460460
this.name = 'AssertionError';
461461
}
Collapse file

‎lib/internal/buffer.js‎

Copy file name to clipboardExpand all lines: lib/internal/buffer.js
+12-12Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -952,18 +952,18 @@ function writeFloatBackwards(val, offset = 0) {
952952
class FastBuffer extends Uint8Array {}
953953

954954
function addBufferPrototypeMethods(proto) {
955-
proto.readBigUInt64LE = readBigUInt64LE,
956-
proto.readBigUInt64BE = readBigUInt64BE,
957-
proto.readBigUint64LE = readBigUInt64LE,
958-
proto.readBigUint64BE = readBigUInt64BE,
959-
proto.readBigInt64LE = readBigInt64LE,
960-
proto.readBigInt64BE = readBigInt64BE,
961-
proto.writeBigUInt64LE = writeBigUInt64LE,
962-
proto.writeBigUInt64BE = writeBigUInt64BE,
963-
proto.writeBigUint64LE = writeBigUInt64LE,
964-
proto.writeBigUint64BE = writeBigUInt64BE,
965-
proto.writeBigInt64LE = writeBigInt64LE,
966-
proto.writeBigInt64BE = writeBigInt64BE,
955+
proto.readBigUInt64LE = readBigUInt64LE;
956+
proto.readBigUInt64BE = readBigUInt64BE;
957+
proto.readBigUint64LE = readBigUInt64LE;
958+
proto.readBigUint64BE = readBigUInt64BE;
959+
proto.readBigInt64LE = readBigInt64LE;
960+
proto.readBigInt64BE = readBigInt64BE;
961+
proto.writeBigUInt64LE = writeBigUInt64LE;
962+
proto.writeBigUInt64BE = writeBigUInt64BE;
963+
proto.writeBigUint64LE = writeBigUInt64LE;
964+
proto.writeBigUint64BE = writeBigUInt64BE;
965+
proto.writeBigInt64LE = writeBigInt64LE;
966+
proto.writeBigInt64BE = writeBigInt64BE;
967967

968968
proto.readUIntLE = readUIntLE;
969969
proto.readUInt32LE = readUInt32LE;
Collapse file

‎lib/internal/errors.js‎

Copy file name to clipboardExpand all lines: lib/internal/errors.js
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ function addCodeToName(err, name, code) {
332332
err.name = `${name} [${code}]`;
333333
// Access the stack to generate the error message including the error code
334334
// from the name.
335-
err.stack;
335+
err.stack; // eslint-disable-line no-unused-expressions
336336
// Reset the name to the actual name.
337337
if (name === 'SystemError') {
338338
ObjectDefineProperty(err, 'name', {
@@ -1411,11 +1411,11 @@ E('ERR_TLS_CERT_ALTNAME_INVALID', function(reason, host, cert) {
14111411
}, Error);
14121412
E('ERR_TLS_DH_PARAM_SIZE', 'DH parameter size %s is less than 2048', Error);
14131413
E('ERR_TLS_HANDSHAKE_TIMEOUT', 'TLS handshake timeout', Error);
1414-
E('ERR_TLS_INVALID_CONTEXT', '%s must be a SecureContext', TypeError),
1415-
E('ERR_TLS_INVALID_STATE', 'TLS socket connection must be securely established',
1416-
Error),
1414+
E('ERR_TLS_INVALID_CONTEXT', '%s must be a SecureContext', TypeError);
14171415
E('ERR_TLS_INVALID_PROTOCOL_VERSION',
14181416
'%j is not a valid %s TLS protocol version', TypeError);
1417+
E('ERR_TLS_INVALID_STATE', 'TLS socket connection must be securely established',
1418+
Error);
14191419
E('ERR_TLS_PROTOCOL_VERSION_CONFLICT',
14201420
'TLS protocol version %j conflicts with secureProtocol %j', TypeError);
14211421
E('ERR_TLS_RENEGOTIATION_DISABLED',

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.