Skip to content

Commit 50e06c6

Browse files
chore: fix JavaScript lint errors (issue #8670)
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent e7054b7 commit 50e06c6

File tree

3 files changed

+37
-31
lines changed
  • lib/node_modules/@stdlib

3 files changed

+37
-31
lines changed

lib/node_modules/@stdlib/_tools/eslint/rules/jsdoc-list-item-bullet-indent/lib/main.js

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,26 @@ var rule;
3939

4040
// FUNCTIONS //
4141

42+
/**
43+
* Copies AST node location info.
44+
*
45+
* @private
46+
* @param {Object} loc - AST node location
47+
* @returns {Object} copied location info
48+
*/
49+
function copyLocationInfo( loc ) {
50+
return {
51+
'start': {
52+
'line': loc.start.line,
53+
'column': loc.start.column
54+
},
55+
'end': {
56+
'line': loc.end.line,
57+
'column': loc.end.column
58+
}
59+
};
60+
}
61+
4262
/**
4363
* Rule to prevent unnecessary indentation of Markdown list item bullets in JSDoc descriptions.
4464
*
@@ -112,26 +132,6 @@ function main( context ) {
112132
}
113133
}
114134

115-
/**
116-
* Copies AST node location info.
117-
*
118-
* @private
119-
* @param {Object} loc - AST node location
120-
* @returns {Object} copied location info
121-
*/
122-
function copyLocationInfo( loc ) {
123-
return {
124-
'start': {
125-
'line': loc.start.line,
126-
'column': loc.start.column
127-
},
128-
'end': {
129-
'line': loc.end.line,
130-
'column': loc.end.column
131-
}
132-
};
133-
}
134-
135135
/**
136136
* Reports an error message.
137137
*

lib/node_modules/@stdlib/repl/presentation/lib/commands/last_fragment.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,22 +30,22 @@
3030
function command( pres ) {
3131
return onCommand;
3232

33+
/**
34+
* Callback invoked upon a `drain` event.
35+
*
36+
* @private
37+
*/
38+
function onDrain() {
39+
pres.lastFragment().show();
40+
}
41+
3342
/**
3443
* Jumps to the last fragment of the current slide.
3544
*
3645
* @private
3746
*/
3847
function onCommand() {
3948
pres._repl.once( 'drain', onDrain ); // eslint-disable-line no-underscore-dangle
40-
41-
/**
42-
* Callback invoked upon a `drain` event.
43-
*
44-
* @private
45-
*/
46-
function onDrain() {
47-
pres.lastFragment().show();
48-
}
4949
}
5050
}
5151

lib/node_modules/@stdlib/utils/timeit/lib/main.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ var transform = require( './transform.js' );
3535

3636
// VARIABLES //
3737

38-
var FILENAME = 'timeit.js';
38+
// cspell:ignore timeit
39+
var FILENAME = 'timeit.js'; // filename
3940
var MIN_TIME = 0.1; // seconds
4041
var ITERATIONS = 10; // 10^1
4142
var MAX_ITERATIONS = 10000000000; // 10^10
@@ -83,6 +84,7 @@ function timeit( code, options, clbk ) {
8384
var err;
8485
var idx;
8586
var cb;
87+
var i;
8688

8789
if ( !isString( code ) ) {
8890
throw new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', code ) );
@@ -100,7 +102,10 @@ function timeit( code, options, clbk ) {
100102
if ( !isFunction( cb ) ) {
101103
throw new TypeError( format( 'invalid argument. Callback argument must be a function. Value: `%s`.', cb ) );
102104
}
103-
results = new Array( opts.repeats );
105+
results = [ ];
106+
for ( i = 0; i < opts.repeats; i++ ) {
107+
results[ i ] = 0;
108+
}
104109
dir = cwd();
105110
idx = 0;
106111

@@ -213,6 +218,7 @@ function timeit( code, options, clbk ) {
213218
if ( !error ) {
214219
out = transform( results, opts.iterations );
215220
}
221+
// cspell:ignore zalgo
216222
// Avoid releasing the zalgo:
217223
nextTick( onTick );
218224

0 commit comments

Comments
 (0)