From 7dd352d0dc3600e878676b113cbabe267e6e8c4c Mon Sep 17 00:00:00 2001 From: rajanarahul93 Date: Tue, 7 Oct 2025 10:48:53 +0530 Subject: [PATCH] chore: fix JavaScript lint errors (issue #8213) --- .../@stdlib/bench/harness/lib/log/index.js | 4 +-- .../stats/pcorrtest/benchmark/benchmark.js | 32 +++++++++---------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/lib/node_modules/@stdlib/bench/harness/lib/log/index.js b/lib/node_modules/@stdlib/bench/harness/lib/log/index.js index 6240c230fe4d..aa04d7d9309b 100644 --- a/lib/node_modules/@stdlib/bench/harness/lib/log/index.js +++ b/lib/node_modules/@stdlib/bench/harness/lib/log/index.js @@ -20,7 +20,7 @@ // MODULES // -var TransformStream = require( '@stdlib/streams/node/transform' ); +var Transform = require( '@stdlib/streams/node/transform' ); var fromCodePoint = require( '@stdlib/string/from-code-point' ); var log = require( './log.js' ); @@ -37,7 +37,7 @@ function createStream() { var stream; var line; - stream = new TransformStream({ + stream = new Transform({ 'transform': transform, 'flush': flush }); diff --git a/lib/node_modules/@stdlib/stats/pcorrtest/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/pcorrtest/benchmark/benchmark.js index 4d1ab628688c..07e3962186c1 100644 --- a/lib/node_modules/@stdlib/stats/pcorrtest/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/stats/pcorrtest/benchmark/benchmark.js @@ -40,11 +40,11 @@ bench( pkg, function benchmark( b ) { var i; rho = 0.5; - x = new Array( 300 ); - y = new Array( 300 ); + x = []; + y = []; for ( i = 0; i < 300; i++ ) { - x[ i ] = rnorm( 0.0, 1.0 ); - y[ i ] = ( rho * x[ i ] ) + rnorm( 0.0, sqrt( 1.0 - (rho*rho) ) ); + x.push( rnorm( 0.0, 1.0 ) ); + y.push( ( rho * x[ i ] ) + rnorm( 0.0, sqrt( 1.0 - (rho*rho) ) ) ); } b.tic(); @@ -74,11 +74,11 @@ bench( pkg+'::one-sided', function benchmark( b ) { var i; rho = 0.5; - x = new Array( 300 ); - y = new Array( 300 ); + x = []; + y = []; for ( i = 0; i < 300; i++ ) { - x[ i ] = rnorm( 0.0, 1.0 ); - y[ i ] = ( rho * x[ i ] ) + rnorm( 0.0, sqrt( 1.0 - (rho*rho) ) ); + x.push( rnorm( 0.0, 1.0 ) ); + y.push( ( rho * x[ i ] ) + rnorm( 0.0, sqrt( 1.0 - (rho*rho) ) ) ); } opts = { 'alternative': 'less' @@ -111,11 +111,11 @@ bench( pkg+':rho=0.5', function benchmark( b ) { var i; rho = 0.5; - x = new Array( 300 ); - y = new Array( 300 ); + x = []; + y = []; for ( i = 0; i < 300; i++ ) { - x[ i ] = rnorm( 0.0, 1.0 ); - y[ i ] = ( rho * x[ i ] ) + rnorm( 0.0, sqrt( 1.0 - (rho*rho) ) ); + x.push( rnorm( 0.0, 1.0 ) ); + y.push( ( rho * x[ i ] ) + rnorm( 0.0, sqrt( 1.0 - (rho*rho) ) ) ); } opts = { 'rho': 0.5 @@ -148,11 +148,11 @@ bench( pkg+':print', function benchmark( b ) { var i; rho = 0.5; - x = new Array( 300 ); - y = new Array( 300 ); + x = []; + y = []; for ( i = 0; i < 300; i++ ) { - x[ i ] = rnorm( 0.0, 1.0 ); - y[ i ] = ( rho * x[ i ] ) + rnorm( 0.0, sqrt( 1.0 - (rho*rho) ) ); + x.push( rnorm( 0.0, 1.0 ) ); + y.push( ( rho * x[ i ] ) + rnorm( 0.0, sqrt( 1.0 - (rho*rho) ) ) ); } result = pcorrtest( x, y );