From 8077e333bf5368fd9a2fdaf69a768efa5804b0bf Mon Sep 17 00:00:00 2001 From: Abdelrahman Samir Date: Mon, 3 Mar 2025 16:35:58 +0200 Subject: [PATCH 1/3] fix(buffer): remove unused eslint-disable directives in polyfill.js --- type: pre_push_report description: Results of running various checks prior to pushing changes. report: - task: run_javascript_examples status: na - task: run_c_examples status: na - task: run_cpp_examples status: na - task: run_javascript_readme_examples status: na - task: run_c_benchmarks status: na - task: run_cpp_benchmarks status: na - task: run_fortran_benchmarks status: na - task: run_javascript_benchmarks status: na - task: run_julia_benchmarks status: na - task: run_python_benchmarks status: na - task: run_r_benchmarks status: na - task: run_javascript_tests status: na --- --- lib/node_modules/@stdlib/buffer/from-string/lib/polyfill.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/node_modules/@stdlib/buffer/from-string/lib/polyfill.js b/lib/node_modules/@stdlib/buffer/from-string/lib/polyfill.js index 41ad74b07984..57ee511df3b2 100644 --- a/lib/node_modules/@stdlib/buffer/from-string/lib/polyfill.js +++ b/lib/node_modules/@stdlib/buffer/from-string/lib/polyfill.js @@ -49,9 +49,9 @@ function fromString( str, encoding ) { if ( !isString( encoding ) ) { throw new TypeError( format( 'invalid argument. Second argument must be a string. Value: `%s`.', encoding ) ); } - return new Buffer( str, encoding ); // eslint-disable-line no-buffer-constructor + return new Buffer( str, encoding ); } - return new Buffer( str, 'utf8' ); // eslint-disable-line no-buffer-constructor + return new Buffer( str, 'utf8' ); } From 077aab32e9b693359c4b1dee2fd2d8391d33a6b6 Mon Sep 17 00:00:00 2001 From: Abdelrahman Samir Date: Wed, 5 Mar 2025 10:35:39 +0200 Subject: [PATCH 2/3] fix: replace new Array() with Array() constructor --- type: pre_push_report description: Results of running various checks prior to pushing changes. report: - task: run_javascript_examples status: na - task: run_c_examples status: na - task: run_cpp_examples status: na - task: run_javascript_readme_examples status: na - task: run_c_benchmarks status: na - task: run_cpp_benchmarks status: na - task: run_fortran_benchmarks status: na - task: run_javascript_benchmarks status: na - task: run_julia_benchmarks status: na - task: run_python_benchmarks status: na - task: run_r_benchmarks status: na - task: run_javascript_tests status: na --- --- .../plot/components/svg/symbols/lib/render/closed_circles.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/plot/components/svg/symbols/lib/render/closed_circles.js b/lib/node_modules/@stdlib/plot/components/svg/symbols/lib/render/closed_circles.js index 40712bdc5b34..eef8f672c1e1 100644 --- a/lib/node_modules/@stdlib/plot/components/svg/symbols/lib/render/closed_circles.js +++ b/lib/node_modules/@stdlib/plot/components/svg/symbols/lib/render/closed_circles.js @@ -67,7 +67,7 @@ function render( state ) { x = state.x; y = state.y; - out = new Array( x.length ); + out = Array( x.length ); for ( i = 0; i < x.length; i++ ) { xi = x[ i ]; yi = y[ i ]; From 064e3b712fccc7a9ac1b227f1d9124d869f89ebd Mon Sep 17 00:00:00 2001 From: Abdelrahman Samir Date: Wed, 5 Mar 2025 10:39:14 +0200 Subject: [PATCH 3/3] refactor(lint): use array push instead of pre-allocation in closed circles renderer --- type: pre_push_report description: Results of running various checks prior to pushing changes. report: - task: run_javascript_examples status: na - task: run_c_examples status: na - task: run_cpp_examples status: na - task: run_javascript_readme_examples status: na - task: run_c_benchmarks status: na - task: run_cpp_benchmarks status: na - task: run_fortran_benchmarks status: na - task: run_javascript_benchmarks status: na - task: run_julia_benchmarks status: na - task: run_python_benchmarks status: na - task: run_r_benchmarks status: na - task: run_javascript_tests status: na --- --- type: pre_push_report description: Results of running various checks prior to pushing changes. report: - task: run_javascript_examples status: na - task: run_c_examples status: na - task: run_cpp_examples status: na - task: run_javascript_readme_examples status: na - task: run_c_benchmarks status: na - task: run_cpp_benchmarks status: na - task: run_fortran_benchmarks status: na - task: run_javascript_benchmarks status: na - task: run_julia_benchmarks status: na - task: run_python_benchmarks status: na - task: run_r_benchmarks status: na - task: run_javascript_tests status: na --- --- .../plot/components/svg/symbols/lib/render/closed_circles.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/node_modules/@stdlib/plot/components/svg/symbols/lib/render/closed_circles.js b/lib/node_modules/@stdlib/plot/components/svg/symbols/lib/render/closed_circles.js index eef8f672c1e1..fcc6a30ef2cb 100644 --- a/lib/node_modules/@stdlib/plot/components/svg/symbols/lib/render/closed_circles.js +++ b/lib/node_modules/@stdlib/plot/components/svg/symbols/lib/render/closed_circles.js @@ -67,7 +67,7 @@ function render( state ) { x = state.x; y = state.y; - out = Array( x.length ); + out = []; for ( i = 0; i < x.length; i++ ) { xi = x[ i ]; yi = y[ i ]; @@ -91,7 +91,7 @@ function render( state ) { } }; debug( 'Generating a virtual DOM tree (%s) with properties: %s.', ELEMENT, JSON.stringify( props ) ); - out[ i ] = h( ELEMENT, props, [] ); + out.push( h( ELEMENT, props, [] ) ); } return out; }