From c785fec941dae0da65eb1df516a503da8f4d2cde Mon Sep 17 00:00:00 2001 From: rajanarahul93 Date: Sun, 14 Sep 2025 15:28:28 +0530 Subject: [PATCH 1/4] chore: fix JavaScript lint errors (issue #8050) --- .../@stdlib/assert/has-bigint-support/lib/main.js | 14 ++------------ .../assert/is-enumerable-property/lib/native.js | 8 ++++++++ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/lib/node_modules/@stdlib/assert/has-bigint-support/lib/main.js b/lib/node_modules/@stdlib/assert/has-bigint-support/lib/main.js index 309b73a0a0ac..7b1d74955e72 100644 --- a/lib/node_modules/@stdlib/assert/has-bigint-support/lib/main.js +++ b/lib/node_modules/@stdlib/assert/has-bigint-support/lib/main.js @@ -20,12 +20,7 @@ // MODULES // -var getGlobal = require( '@stdlib/utils/global' ); - - -// VARIABLES // - -var Global = getGlobal(); +var BigInt = require( '@stdlib/bigint/ctor' ); // MAIN // @@ -40,12 +35,7 @@ var Global = getGlobal(); * // returns */ function hasBigIntSupport() { - return ( - typeof Global.BigInt === 'function' && - typeof BigInt === 'function' && // eslint-disable-line stdlib/require-globals - typeof Global.BigInt( '1' ) === 'bigint' && - typeof BigInt( '1' ) === 'bigint' // eslint-disable-line stdlib/require-globals, no-undef - ); + return ( BigInt !== null ); } diff --git a/lib/node_modules/@stdlib/assert/is-enumerable-property/lib/native.js b/lib/node_modules/@stdlib/assert/is-enumerable-property/lib/native.js index 143e16621ebf..de796f7891e9 100644 --- a/lib/node_modules/@stdlib/assert/is-enumerable-property/lib/native.js +++ b/lib/node_modules/@stdlib/assert/is-enumerable-property/lib/native.js @@ -45,6 +45,14 @@ * * var bool = isEnumerableProperty( beep, 'hasOwnProperty' ); * // returns false +* +* @example +* var bool = isEnumerableProperty( null, 'boop' ); +* // throws +* +* @example +* var bool = isEnumerableProperty( void 0, 'boop' ); +* // throws */ var isEnumerableProperty = Object.prototype.propertyIsEnumerable; From 08fbf9401fa3026db9ef1cdf00c87d26fe985477 Mon Sep 17 00:00:00 2001 From: rajanarahul93 Date: Sun, 14 Sep 2025 20:47:43 +0530 Subject: [PATCH 2/4] fix: apply review feedback --- .../@stdlib/assert/has-bigint-support/lib/main.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/node_modules/@stdlib/assert/has-bigint-support/lib/main.js b/lib/node_modules/@stdlib/assert/has-bigint-support/lib/main.js index 7b1d74955e72..50ffe0f3c3bd 100644 --- a/lib/node_modules/@stdlib/assert/has-bigint-support/lib/main.js +++ b/lib/node_modules/@stdlib/assert/has-bigint-support/lib/main.js @@ -20,7 +20,12 @@ // MODULES // -var BigInt = require( '@stdlib/bigint/ctor' ); +var getGlobal = require( '@stdlib/utils/global' ); + + +// VARIABLES // + +var Global = getGlobal(); // MAIN // @@ -35,7 +40,12 @@ var BigInt = require( '@stdlib/bigint/ctor' ); * // returns */ function hasBigIntSupport() { - return ( BigInt !== null ); + return ( + typeof Global.BigInt === 'function' && + typeof BigInt === 'function' && // eslint-disable-line stdlib/require-globals, stdlib/no-builtin-big-int + typeof Global.BigInt( '1' ) === 'bigint' && + typeof BigInt( '1' ) === 'bigint' // eslint-disable-line stdlib/require-globals, no-undef, stdlib/no-builtin-big-int + ); } From ec4c458314bb362b380882b7e74d4b84ca272db3 Mon Sep 17 00:00:00 2001 From: Athan Date: Sun, 14 Sep 2025 13:50:08 -0700 Subject: [PATCH 3/4] docs: fix examples Signed-off-by: Athan --- .../assert/is-enumerable-property/lib/native.js | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/lib/node_modules/@stdlib/assert/is-enumerable-property/lib/native.js b/lib/node_modules/@stdlib/assert/is-enumerable-property/lib/native.js index de796f7891e9..5c4647426850 100644 --- a/lib/node_modules/@stdlib/assert/is-enumerable-property/lib/native.js +++ b/lib/node_modules/@stdlib/assert/is-enumerable-property/lib/native.js @@ -35,7 +35,7 @@ * 'boop': true * }; * -* var bool = isEnumerableProperty( beep, 'boop' ); +* var bool = isEnumerableProperty.call( beep, 'boop' ); * // returns true * * @example @@ -43,16 +43,8 @@ * 'boop': true * }; * -* var bool = isEnumerableProperty( beep, 'hasOwnProperty' ); +* var bool = isEnumerableProperty.call( beep, 'hasOwnProperty' ); * // returns false -* -* @example -* var bool = isEnumerableProperty( null, 'boop' ); -* // throws -* -* @example -* var bool = isEnumerableProperty( void 0, 'boop' ); -* // throws */ var isEnumerableProperty = Object.prototype.propertyIsEnumerable; From cd990275cb6c7c4ddc4d607d048b3d1d2dafd78d Mon Sep 17 00:00:00 2001 From: Athan Date: Sun, 14 Sep 2025 13:52:31 -0700 Subject: [PATCH 4/4] style: re-enable lint rule Signed-off-by: Athan --- lib/node_modules/@stdlib/assert/has-bigint-support/lib/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/assert/has-bigint-support/lib/main.js b/lib/node_modules/@stdlib/assert/has-bigint-support/lib/main.js index 50ffe0f3c3bd..d77e5401e868 100644 --- a/lib/node_modules/@stdlib/assert/has-bigint-support/lib/main.js +++ b/lib/node_modules/@stdlib/assert/has-bigint-support/lib/main.js @@ -42,7 +42,7 @@ var Global = getGlobal(); function hasBigIntSupport() { return ( typeof Global.BigInt === 'function' && - typeof BigInt === 'function' && // eslint-disable-line stdlib/require-globals, stdlib/no-builtin-big-int + typeof BigInt === 'function' && // eslint-disable-line stdlib/require-globals typeof Global.BigInt( '1' ) === 'bigint' && typeof BigInt( '1' ) === 'bigint' // eslint-disable-line stdlib/require-globals, no-undef, stdlib/no-builtin-big-int );