From 15d191e9aa4de61ce65f67f5fd6442520627643f Mon Sep 17 00:00:00 2001 From: Shubham Date: Fri, 3 Oct 2025 21:50:11 +0530 Subject: [PATCH 1/6] fix eslint error in #8189 --- etc/eslint/rules/stdlib.js | 4 ++-- .../remove-header-file-list/lib/index.js | 7 ------- .../base/slice-dimension-from/test/test.js | 20 +++++++++---------- tools/make/lib/complexity/javascript.mk | 6 +----- 4 files changed, 13 insertions(+), 24 deletions(-) diff --git a/etc/eslint/rules/stdlib.js b/etc/eslint/rules/stdlib.js index a55ab53096ef..760c450dbff7 100644 --- a/etc/eslint/rules/stdlib.js +++ b/etc/eslint/rules/stdlib.js @@ -4676,12 +4676,12 @@ rules[ 'stdlib/require-globals' ] = [ 'error', { * * @example * // Bad... -* var foo = require( 'foo/bar.js' ); +* * var baz = require( '../baz.js' ); * * @example * // Good... -* var foo = require( './foo/bar.js' ); +* * var baz = require( './../baz.js' ); */ rules[ 'stdlib/require-leading-slash' ] = 'error'; diff --git a/lib/node_modules/@stdlib/_tools/licenses/remove-header-file-list/lib/index.js b/lib/node_modules/@stdlib/_tools/licenses/remove-header-file-list/lib/index.js index 010e8e24195a..86ea0421bdce 100644 --- a/lib/node_modules/@stdlib/_tools/licenses/remove-header-file-list/lib/index.js +++ b/lib/node_modules/@stdlib/_tools/licenses/remove-header-file-list/lib/index.js @@ -26,10 +26,6 @@ * @example * var removeHeader = require( '@stdlib/_tools/licenses/remove-header-file-list' ); * -* var files = [ -* './foo/bar.js' -* ]; -* * var header = '// This file is licensed under Apache-2.0.'; * * removeHeader( files, header, done ); @@ -43,9 +39,6 @@ * @example * var removeHeader = require( '@stdlib/_tools/licenses/remove-header-file-list' ); * -* var files = [ -* './foo/bar.js' -* ]; * * var header = '// This file is licensed under Apache-2.0.'; * diff --git a/lib/node_modules/@stdlib/ndarray/base/slice-dimension-from/test/test.js b/lib/node_modules/@stdlib/ndarray/base/slice-dimension-from/test/test.js index 3bc69ea08a66..59abb9e5b4e0 100644 --- a/lib/node_modules/@stdlib/ndarray/base/slice-dimension-from/test/test.js +++ b/lib/node_modules/@stdlib/ndarray/base/slice-dimension-from/test/test.js @@ -164,11 +164,11 @@ tape( 'in non-strict mode, the function returns an empty array when a starting i var i; values = [ - zeros( [ 1 ], { 'dtype': 'float64' } ), - zeros( [ 1, 1 ], { 'dtype': 'float32' } ), - zeros( [ 1, 1, 1 ], { 'dtype': 'int32' } ), - zeros( [ 1, 1, 1, 1 ], { 'dtype': 'uint32' } ), - zeros( [ 1, 1, 1, 1, 1 ], { 'dtype': 'complex128' } ) + zeros([ 1 ], { 'dtype': 'float64' }), + zeros([ 1, 1 ], { 'dtype': 'float32' }), + zeros([ 1, 1, 1 ], { 'dtype': 'int32' }), + zeros([ 1, 1, 1, 1 ], { 'dtype': 'uint32' }), + zeros([ 1, 1, 1, 1, 1 ], { 'dtype': 'complex128' }) ]; start = [ @@ -195,11 +195,11 @@ tape( 'in non-strict mode, the function returns an empty array when a starting i var i; values = [ - zeros( [ 1 ], { 'dtype': 'float64' } ), - zeros( [ 1, 1 ], { 'dtype': 'float32' } ), - zeros( [ 1, 1, 1 ], { 'dtype': 'int32' } ), - zeros( [ 1, 1, 1, 1 ], { 'dtype': 'uint32' } ), - zeros( [ 1, 1, 1, 1, 1 ], { 'dtype': 'complex128' } ) + zeros([ 1 ], { 'dtype': 'float64' }), + zeros([ 1, 1 ], { 'dtype': 'float32' }), + zeros([ 1, 1, 1 ], { 'dtype': 'int32' }), + zeros([ 1, 1, 1, 1 ], { 'dtype': 'uint32' }), + zeros([ 1, 1, 1, 1, 1 ], { 'dtype': 'complex128' }) ]; dim = [ diff --git a/tools/make/lib/complexity/javascript.mk b/tools/make/lib/complexity/javascript.mk index 70a6577ec787..298d2a41c488 100644 --- a/tools/make/lib/complexity/javascript.mk +++ b/tools/make/lib/complexity/javascript.mk @@ -129,11 +129,7 @@ complexity-javascript-benchmarks: $(NODE_MODULES) # @param {string} FILES - list of JavaScript file paths # @param {string} [JAVASCRIPT_COMPLEXITY_OUT] - output directory # -# @example -# make complexity-javascript-files FILES='/foo/bar.js /beep/boop.js' -# -# @example -# make complexity-javascript-files FILES='/foo/bar.js /beep/boop.js' JAVASCRIPT_COMPLEXITY_OUT=/foo/bar/beep/boop +# #/ complexity-javascript-files: $(NODE_MODULES) $(QUIET) $(JAVASCRIPT_COMPLEXITY) $(JAVASCRIPT_COMPLEXITY_FLAGS) $(FILES) From e9bf2aed29c808ca9449c4c56d0f7fb6f7784065 Mon Sep 17 00:00:00 2001 From: Athan Date: Fri, 3 Oct 2025 10:50:26 -0700 Subject: [PATCH 2/6] Discard changes to etc/eslint/rules/stdlib.js --- etc/eslint/rules/stdlib.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/eslint/rules/stdlib.js b/etc/eslint/rules/stdlib.js index 760c450dbff7..a55ab53096ef 100644 --- a/etc/eslint/rules/stdlib.js +++ b/etc/eslint/rules/stdlib.js @@ -4676,12 +4676,12 @@ rules[ 'stdlib/require-globals' ] = [ 'error', { * * @example * // Bad... -* +* var foo = require( 'foo/bar.js' ); * var baz = require( '../baz.js' ); * * @example * // Good... -* +* var foo = require( './foo/bar.js' ); * var baz = require( './../baz.js' ); */ rules[ 'stdlib/require-leading-slash' ] = 'error'; From 2886741ad3032368609fa7b1f0bee07e36d788c5 Mon Sep 17 00:00:00 2001 From: Athan Date: Fri, 3 Oct 2025 10:50:32 -0700 Subject: [PATCH 3/6] Discard changes to lib/node_modules/@stdlib/_tools/licenses/remove-header-file-list/lib/index.js --- .../_tools/licenses/remove-header-file-list/lib/index.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/node_modules/@stdlib/_tools/licenses/remove-header-file-list/lib/index.js b/lib/node_modules/@stdlib/_tools/licenses/remove-header-file-list/lib/index.js index 86ea0421bdce..010e8e24195a 100644 --- a/lib/node_modules/@stdlib/_tools/licenses/remove-header-file-list/lib/index.js +++ b/lib/node_modules/@stdlib/_tools/licenses/remove-header-file-list/lib/index.js @@ -26,6 +26,10 @@ * @example * var removeHeader = require( '@stdlib/_tools/licenses/remove-header-file-list' ); * +* var files = [ +* './foo/bar.js' +* ]; +* * var header = '// This file is licensed under Apache-2.0.'; * * removeHeader( files, header, done ); @@ -39,6 +43,9 @@ * @example * var removeHeader = require( '@stdlib/_tools/licenses/remove-header-file-list' ); * +* var files = [ +* './foo/bar.js' +* ]; * * var header = '// This file is licensed under Apache-2.0.'; * From e404a3c84de373e62d3ad28990d75aaf643e91d6 Mon Sep 17 00:00:00 2001 From: Athan Date: Fri, 3 Oct 2025 10:50:47 -0700 Subject: [PATCH 4/6] Discard changes to tools/make/lib/complexity/javascript.mk --- tools/make/lib/complexity/javascript.mk | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/make/lib/complexity/javascript.mk b/tools/make/lib/complexity/javascript.mk index 298d2a41c488..70a6577ec787 100644 --- a/tools/make/lib/complexity/javascript.mk +++ b/tools/make/lib/complexity/javascript.mk @@ -129,7 +129,11 @@ complexity-javascript-benchmarks: $(NODE_MODULES) # @param {string} FILES - list of JavaScript file paths # @param {string} [JAVASCRIPT_COMPLEXITY_OUT] - output directory # -# +# @example +# make complexity-javascript-files FILES='/foo/bar.js /beep/boop.js' +# +# @example +# make complexity-javascript-files FILES='/foo/bar.js /beep/boop.js' JAVASCRIPT_COMPLEXITY_OUT=/foo/bar/beep/boop #/ complexity-javascript-files: $(NODE_MODULES) $(QUIET) $(JAVASCRIPT_COMPLEXITY) $(JAVASCRIPT_COMPLEXITY_FLAGS) $(FILES) From 953486371339c59e4c43890e77af6499f8cca7ce Mon Sep 17 00:00:00 2001 From: Athan Date: Fri, 3 Oct 2025 10:53:33 -0700 Subject: [PATCH 5/6] style: disable lint rule Signed-off-by: Athan --- .../base/slice-dimension-from/test/test.js | 30 +++++++++++-------- 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/lib/node_modules/@stdlib/ndarray/base/slice-dimension-from/test/test.js b/lib/node_modules/@stdlib/ndarray/base/slice-dimension-from/test/test.js index 59abb9e5b4e0..30d458fbca42 100644 --- a/lib/node_modules/@stdlib/ndarray/base/slice-dimension-from/test/test.js +++ b/lib/node_modules/@stdlib/ndarray/base/slice-dimension-from/test/test.js @@ -16,8 +16,6 @@ * limitations under the License. */ -/* eslint-disable object-curly-newline */ - 'use strict'; // MODULES // @@ -163,14 +161,18 @@ tape( 'in non-strict mode, the function returns an empty array when a starting i var start; var i; + /* eslint-disable object-curly-newline, stdlib/line-closing-bracket-spacing */ + values = [ - zeros([ 1 ], { 'dtype': 'float64' }), - zeros([ 1, 1 ], { 'dtype': 'float32' }), - zeros([ 1, 1, 1 ], { 'dtype': 'int32' }), - zeros([ 1, 1, 1, 1 ], { 'dtype': 'uint32' }), - zeros([ 1, 1, 1, 1, 1 ], { 'dtype': 'complex128' }) + zeros( [ 1 ], { 'dtype': 'float64' } ), + zeros( [ 1, 1 ], { 'dtype': 'float32' } ), + zeros( [ 1, 1, 1 ], { 'dtype': 'int32' } ), + zeros( [ 1, 1, 1, 1 ], { 'dtype': 'uint32' } ), + zeros( [ 1, 1, 1, 1, 1 ], { 'dtype': 'complex128' } ) ]; + /* eslint-enable object-curly-newline, stdlib/line-closing-bracket-spacing */ + start = [ 10, 20, @@ -194,14 +196,18 @@ tape( 'in non-strict mode, the function returns an empty array when a starting i var dim; var i; + /* eslint-disable object-curly-newline, stdlib/line-closing-bracket-spacing */ + values = [ - zeros([ 1 ], { 'dtype': 'float64' }), - zeros([ 1, 1 ], { 'dtype': 'float32' }), - zeros([ 1, 1, 1 ], { 'dtype': 'int32' }), - zeros([ 1, 1, 1, 1 ], { 'dtype': 'uint32' }), - zeros([ 1, 1, 1, 1, 1 ], { 'dtype': 'complex128' }) + zeros( [ 1 ], { 'dtype': 'float64' } ), + zeros( [ 1, 1 ], { 'dtype': 'float32' } ), + zeros( [ 1, 1, 1 ], { 'dtype': 'int32' } ), + zeros( [ 1, 1, 1, 1 ], { 'dtype': 'uint32' } ), + zeros( [ 1, 1, 1, 1, 1 ], { 'dtype': 'complex128' } ) ]; + /* eslint-enable object-curly-newline, stdlib/line-closing-bracket-spacing */ + dim = [ 0, 1, From acae3f94bc35f512679d694d83db4cd4c8f2b38a Mon Sep 17 00:00:00 2001 From: Athan Date: Fri, 3 Oct 2025 10:58:52 -0700 Subject: [PATCH 6/6] style: remove whitespace Signed-off-by: Athan --- .../@stdlib/ndarray/base/slice-dimension-from/test/test.js | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/node_modules/@stdlib/ndarray/base/slice-dimension-from/test/test.js b/lib/node_modules/@stdlib/ndarray/base/slice-dimension-from/test/test.js index 30d458fbca42..41733596824e 100644 --- a/lib/node_modules/@stdlib/ndarray/base/slice-dimension-from/test/test.js +++ b/lib/node_modules/@stdlib/ndarray/base/slice-dimension-from/test/test.js @@ -162,7 +162,6 @@ tape( 'in non-strict mode, the function returns an empty array when a starting i var i; /* eslint-disable object-curly-newline, stdlib/line-closing-bracket-spacing */ - values = [ zeros( [ 1 ], { 'dtype': 'float64' } ), zeros( [ 1, 1 ], { 'dtype': 'float32' } ),