From dbbbba3b2f4c7a1f105d73ce8894b5badea57235 Mon Sep 17 00:00:00 2001 From: rajanarahul93 Date: Sun, 14 Sep 2025 16:40:46 +0530 Subject: [PATCH 1/9] chore: fix JavaScript lint errors (issue #8043) --- .../assert/is-blank-string/lib/main.js | 2 +- .../@stdlib/cli/ctor/lib/index.js | 27 ++++++++++--------- .../@stdlib/utils/zip/lib/main.js | 4 +-- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/lib/node_modules/@stdlib/assert/is-blank-string/lib/main.js b/lib/node_modules/@stdlib/assert/is-blank-string/lib/main.js index 4ff5111d002a..6644f0b8804b 100644 --- a/lib/node_modules/@stdlib/assert/is-blank-string/lib/main.js +++ b/lib/node_modules/@stdlib/assert/is-blank-string/lib/main.js @@ -25,7 +25,7 @@ var isString = require( '@stdlib/assert/is-string' ).isPrimitive; // VARIABLES // -var RE = /^[\u0009\u000A\u000B\u000C\u000D\u0020\u0085\u00A0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*$/; +var RE = /^[\t\n\v\f\r\u0020\u0085\u00A0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*$/; // MAIN // diff --git a/lib/node_modules/@stdlib/cli/ctor/lib/index.js b/lib/node_modules/@stdlib/cli/ctor/lib/index.js index fae1bb8f5a08..31af0825ead7 100644 --- a/lib/node_modules/@stdlib/cli/ctor/lib/index.js +++ b/lib/node_modules/@stdlib/cli/ctor/lib/index.js @@ -24,20 +24,23 @@ * @module @stdlib/cli/ctor * * @example -* var CLI = require( '@stdlib/cli/ctor' ); -* * var opts = { -* 'pkg': require( './path/to/package.json' ), -* 'help': 'Usage: beep [options] ', -* 'title': 'foo', -* 'updates': true, -* 'options': { -* 'boolean': [ -* 'help', -* 'version' -* ] -* } +* 'pkg': { +* 'name': 'beep', +* 'version': '0.0.0' +* }, +* 'help': 'Usage: beep [options] ', +* 'title': 'foo', +* 'updates': true, +* 'options': { +* 'boolean': [ +* 'help', +* 'version' +* ] +* } * }; +* var CLI = require( '@stdlib/cli/ctor' ); +* * var cli = new CLI( opts ); * // returns * diff --git a/lib/node_modules/@stdlib/utils/zip/lib/main.js b/lib/node_modules/@stdlib/utils/zip/lib/main.js index 654dcd4029f1..63bd4eb8524d 100644 --- a/lib/node_modules/@stdlib/utils/zip/lib/main.js +++ b/lib/node_modules/@stdlib/utils/zip/lib/main.js @@ -155,10 +155,10 @@ function zip() { } } } - out = new Array( len ); + out = []; for ( j = 0; j < len; j++ ) { // Temporary array to store tuples... - arr = new Array( nargs ); + arr = []; // Create the tuples... for ( i = 0; i < nargs; i++ ) { From 8fbbaf110f1943c0573ac2bbda3bb39393e810dc Mon Sep 17 00:00:00 2001 From: rajanarahul93 Date: Sun, 14 Sep 2025 21:04:28 +0530 Subject: [PATCH 2/9] fix: apply review feedback --- .../assert/is-blank-string/lib/main.js | 2 +- .../@stdlib/cli/ctor/lib/index.js | 28 +++++++++---------- .../@stdlib/utils/zip/lib/main.js | 2 +- 3 files changed, 15 insertions(+), 17 deletions(-) diff --git a/lib/node_modules/@stdlib/assert/is-blank-string/lib/main.js b/lib/node_modules/@stdlib/assert/is-blank-string/lib/main.js index 6644f0b8804b..dddb3aa7d4e6 100644 --- a/lib/node_modules/@stdlib/assert/is-blank-string/lib/main.js +++ b/lib/node_modules/@stdlib/assert/is-blank-string/lib/main.js @@ -25,7 +25,7 @@ var isString = require( '@stdlib/assert/is-string' ).isPrimitive; // VARIABLES // -var RE = /^[\t\n\v\f\r\u0020\u0085\u00A0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*$/; +var RE = /^[\u0009\u000A\u000B\u000C\u000D\u0020\u0085\u00A0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*$/; // eslint-disable-line no-control-regex // MAIN // diff --git a/lib/node_modules/@stdlib/cli/ctor/lib/index.js b/lib/node_modules/@stdlib/cli/ctor/lib/index.js index 31af0825ead7..d86c16b3ccfe 100644 --- a/lib/node_modules/@stdlib/cli/ctor/lib/index.js +++ b/lib/node_modules/@stdlib/cli/ctor/lib/index.js @@ -24,27 +24,25 @@ * @module @stdlib/cli/ctor * * @example -* var opts = { -* 'pkg': { -* 'name': 'beep', -* 'version': '0.0.0' -* }, -* 'help': 'Usage: beep [options] ', -* 'title': 'foo', -* 'updates': true, -* 'options': { -* 'boolean': [ -* 'help', -* 'version' -* ] -* } -* }; * var CLI = require( '@stdlib/cli/ctor' ); * +* var opts = { +* 'pkg': require( './path/to/package.json' ), // eslint-disable-line stdlib/jsdoc-doctest +* 'help': 'Usage: beep [options] ', +* 'title': 'foo', +* 'updates': true, +* 'options': { +* 'boolean': [ +* 'help', +* 'version' +* ] +* } +* }; * var cli = new CLI( opts ); * // returns * * cli.close(); +* var CLI = require( '@stdlib/cli/ctor' ); */ // MODULES // diff --git a/lib/node_modules/@stdlib/utils/zip/lib/main.js b/lib/node_modules/@stdlib/utils/zip/lib/main.js index 63bd4eb8524d..eee9ef3c7212 100644 --- a/lib/node_modules/@stdlib/utils/zip/lib/main.js +++ b/lib/node_modules/@stdlib/utils/zip/lib/main.js @@ -171,7 +171,7 @@ function zip() { } arr[ i ] = arg[ j ]; } - out[ j ] = arr; + out.push( arr ); } return out; } From cf3a7ac577c0c589f3803cb475473db024afb699 Mon Sep 17 00:00:00 2001 From: rajanarahul93 Date: Sun, 14 Sep 2025 21:12:05 +0530 Subject: [PATCH 3/9] fix: apply doctest feedback to cli/ctor --- .../@stdlib/cli/ctor/lib/index.js | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/lib/node_modules/@stdlib/cli/ctor/lib/index.js b/lib/node_modules/@stdlib/cli/ctor/lib/index.js index d86c16b3ccfe..4df757f7cf8a 100644 --- a/lib/node_modules/@stdlib/cli/ctor/lib/index.js +++ b/lib/node_modules/@stdlib/cli/ctor/lib/index.js @@ -7,7 +7,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * -* http://www.apache.org/licenses/LICENSE-2.0 +* http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -24,24 +24,23 @@ * @module @stdlib/cli/ctor * * @example -* var CLI = require( '@stdlib/cli/ctor' ); -* * var opts = { -* 'pkg': require( './path/to/package.json' ), // eslint-disable-line stdlib/jsdoc-doctest -* 'help': 'Usage: beep [options] ', -* 'title': 'foo', -* 'updates': true, -* 'options': { -* 'boolean': [ -* 'help', -* 'version' -* ] -* } +* 'pkg': require( './path/to/package.json' ), // eslint-disable-line stdlib/jsdoc-doctest +* 'help': 'Usage: beep [options] ', +* 'title': 'foo', +* 'updates': true, +* 'options': { +* 'boolean': [ +* 'help', +* 'version' +* ] +* } * }; * var cli = new CLI( opts ); * // returns * * cli.close(); +* * var CLI = require( '@stdlib/cli/ctor' ); */ From 7ffec2b288a7ee3d775bd0b7b6f4f3dcb5acdbba Mon Sep 17 00:00:00 2001 From: rajanarahul93 Date: Sun, 14 Sep 2025 21:49:48 +0530 Subject: [PATCH 4/9] fix: apply all review feedback --- lib/node_modules/@stdlib/cli/ctor/lib/index.js | 3 ++- lib/node_modules/@stdlib/utils/zip/lib/main.js | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/node_modules/@stdlib/cli/ctor/lib/index.js b/lib/node_modules/@stdlib/cli/ctor/lib/index.js index 4df757f7cf8a..c6a67a3fd8c5 100644 --- a/lib/node_modules/@stdlib/cli/ctor/lib/index.js +++ b/lib/node_modules/@stdlib/cli/ctor/lib/index.js @@ -24,6 +24,8 @@ * @module @stdlib/cli/ctor * * @example +* var CLI = require( '@stdlib/cli/ctor' ); + * var opts = { * 'pkg': require( './path/to/package.json' ), // eslint-disable-line stdlib/jsdoc-doctest * 'help': 'Usage: beep [options] ', @@ -41,7 +43,6 @@ * * cli.close(); * -* var CLI = require( '@stdlib/cli/ctor' ); */ // MODULES // diff --git a/lib/node_modules/@stdlib/utils/zip/lib/main.js b/lib/node_modules/@stdlib/utils/zip/lib/main.js index eee9ef3c7212..5460d122ef36 100644 --- a/lib/node_modules/@stdlib/utils/zip/lib/main.js +++ b/lib/node_modules/@stdlib/utils/zip/lib/main.js @@ -166,13 +166,14 @@ function zip() { // If an array is too short, use a fill value... if ( arg.length <= j ) { - arr[ i ] = fill; + arr.push( fill ); continue; } - arr[ i ] = arg[ j ]; + arr.push( arg[ j ] ); } out.push( arr ); } + return out; } From c86eee4b86ba53e43d643c74bf6cad2411bcf504 Mon Sep 17 00:00:00 2001 From: Athan Date: Sun, 14 Sep 2025 13:55:41 -0700 Subject: [PATCH 5/9] style: remove empty line Signed-off-by: Athan --- lib/node_modules/@stdlib/utils/zip/lib/main.js | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/node_modules/@stdlib/utils/zip/lib/main.js b/lib/node_modules/@stdlib/utils/zip/lib/main.js index 5460d122ef36..eea02b08e6b0 100644 --- a/lib/node_modules/@stdlib/utils/zip/lib/main.js +++ b/lib/node_modules/@stdlib/utils/zip/lib/main.js @@ -173,7 +173,6 @@ function zip() { } out.push( arr ); } - return out; } From bbe7b9764ba6e2a91e1bf070045ff2d40d5e9120 Mon Sep 17 00:00:00 2001 From: Athan Date: Sun, 14 Sep 2025 13:58:29 -0700 Subject: [PATCH 6/9] style: revert spacing change Signed-off-by: Athan --- lib/node_modules/@stdlib/cli/ctor/lib/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/cli/ctor/lib/index.js b/lib/node_modules/@stdlib/cli/ctor/lib/index.js index c6a67a3fd8c5..f6171580b7ad 100644 --- a/lib/node_modules/@stdlib/cli/ctor/lib/index.js +++ b/lib/node_modules/@stdlib/cli/ctor/lib/index.js @@ -7,7 +7,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * -* http://www.apache.org/licenses/LICENSE-2.0 +* http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, From 59559fe26b9fc5f01ccfaf5e911c25cb65d8c947 Mon Sep 17 00:00:00 2001 From: Athan Date: Sun, 14 Sep 2025 13:58:52 -0700 Subject: [PATCH 7/9] style: revert comment change Signed-off-by: Athan --- lib/node_modules/@stdlib/cli/ctor/lib/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/cli/ctor/lib/index.js b/lib/node_modules/@stdlib/cli/ctor/lib/index.js index f6171580b7ad..c5222ffcc503 100644 --- a/lib/node_modules/@stdlib/cli/ctor/lib/index.js +++ b/lib/node_modules/@stdlib/cli/ctor/lib/index.js @@ -25,7 +25,7 @@ * * @example * var CLI = require( '@stdlib/cli/ctor' ); - +* * var opts = { * 'pkg': require( './path/to/package.json' ), // eslint-disable-line stdlib/jsdoc-doctest * 'help': 'Usage: beep [options] ', From 407cc85b7d2c484faa94b525ddb0c26173783582 Mon Sep 17 00:00:00 2001 From: Athan Date: Sun, 14 Sep 2025 13:59:10 -0700 Subject: [PATCH 8/9] style: remove empty line Signed-off-by: Athan --- lib/node_modules/@stdlib/cli/ctor/lib/index.js | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/node_modules/@stdlib/cli/ctor/lib/index.js b/lib/node_modules/@stdlib/cli/ctor/lib/index.js index c5222ffcc503..9b228c9cfb12 100644 --- a/lib/node_modules/@stdlib/cli/ctor/lib/index.js +++ b/lib/node_modules/@stdlib/cli/ctor/lib/index.js @@ -42,7 +42,6 @@ * // returns * * cli.close(); -* */ // MODULES // From c5b33c150e56bffdebdd3f080599aaf730aad1db Mon Sep 17 00:00:00 2001 From: Athan Date: Sun, 14 Sep 2025 14:01:00 -0700 Subject: [PATCH 9/9] docs: resolve lint failure Signed-off-by: Athan --- .../@stdlib/cli/ctor/lib/index.js | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/lib/node_modules/@stdlib/cli/ctor/lib/index.js b/lib/node_modules/@stdlib/cli/ctor/lib/index.js index 9b228c9cfb12..bc66e953fa19 100644 --- a/lib/node_modules/@stdlib/cli/ctor/lib/index.js +++ b/lib/node_modules/@stdlib/cli/ctor/lib/index.js @@ -27,16 +27,15 @@ * var CLI = require( '@stdlib/cli/ctor' ); * * var opts = { -* 'pkg': require( './path/to/package.json' ), // eslint-disable-line stdlib/jsdoc-doctest -* 'help': 'Usage: beep [options] ', -* 'title': 'foo', -* 'updates': true, -* 'options': { -* 'boolean': [ -* 'help', -* 'version' -* ] -* } +* 'help': 'Usage: beep [options] ', +* 'title': 'foo', +* 'updates': true, +* 'options': { +* 'boolean': [ +* 'help', +* 'version' +* ] +* } * }; * var cli = new CLI( opts ); * // returns