Skip to content

Commit 87a80f2

Browse files
committed
chore: fix JavaScript lint errors
- Move nested `done` callback to outer `factory` scope to satisfy `stdlib/no-unnecessary-nested-functions` in star-repo/lib/factory.js - Fix incorrect doctest return value in binary-dtype-signatures/lib/index.js (`float64` -> `float32`) - Remove spaces in multi-line `Float64Array` bracket expressions in idamax/test/test.ndarray.js to satisfy bracket spacing rules Closes #11852
1 parent 4479454 commit 87a80f2

3 files changed

Lines changed: 21 additions & 20 deletions

File tree

lib/node_modules/@stdlib/_tools/github/star-repo/lib/factory.js

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -84,19 +84,20 @@ function factory( options, clbk ) {
8484
throw new Error( format( 'invalid argument. Repository slug must consist of an owner and a repository (e.g., "stdlib-js/utils"). Value: `%s`.', slug ) );
8585
}
8686
query( slug, opts, done );
87-
/**
88-
* Callback invoked after receiving an API response.
89-
*
90-
* @private
91-
* @param {(Error|null)} error - error object
92-
* @param {Object} info - response info
93-
* @returns {void}
94-
*/
95-
function done( error, info ) {
96-
error = error || null;
97-
info = info || null;
98-
clbk( error, info );
99-
}
87+
}
88+
89+
/**
90+
* Callback invoked after receiving an API response.
91+
*
92+
* @private
93+
* @param {(Error|null)} error - error object
94+
* @param {Object} info - response info
95+
* @returns {void}
96+
*/
97+
function done( error, info ) {
98+
error = error || null;
99+
info = info || null;
100+
clbk( error, info );
100101
}
101102
}
102103

lib/node_modules/@stdlib/blas/base/idamax/test/test.ndarray.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,13 @@ tape( 'the function finds the index of the element with the maximum absolute val
5757
idx = idamax( 4, x, 1, 0 );
5858
t.strictEqual( idx, expected, 'returns expected value' );
5959

60-
x = new Float64Array( [
60+
x = new Float64Array([
6161
0.2, // 1
6262
-0.6, // 2
6363
0.3, // 3
6464
5.0,
6565
5.0
66-
] );
66+
]);
6767
expected = 1;
6868

6969
idx = idamax( 3, x, 1, 0 );
@@ -77,11 +77,11 @@ tape( 'if provided an `N` parameter less than `1`, the function returns `-1`', f
7777
var idx;
7878
var x;
7979

80-
x = new Float64Array( [
80+
x = new Float64Array([
8181
1.0,
8282
2.0,
8383
3.0
84-
] );
84+
]);
8585
expected = -1;
8686

8787
idx = idamax( 0, x, 1, 0 );
@@ -95,11 +95,11 @@ tape( 'if provided an `N` parameter equal to `1`, the function returns `0`', fun
9595
var idx;
9696
var x;
9797

98-
x = new Float64Array( [
98+
x = new Float64Array([
9999
1.0,
100100
2.0,
101101
3.0
102-
] );
102+
]);
103103
expected = 0;
104104

105105
idx = idamax( 1, x, 1, 1 );

lib/node_modules/@stdlib/strided/base/binary-dtype-signatures/lib/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
* ];
3535
*
3636
* var sigs = signatures( dtypes, dtypes, dtypes );
37-
* // returns [ 'float64', 'float64', 'float64', ... ]
37+
* // returns [ 'float32', 'float32', 'float32', ... ]
3838
*/
3939

4040
// MODULES //

0 commit comments

Comments
 (0)