Skip to content

Commit f5f8c09

Browse files
chore: fix JavaScript lint errors
PR-URL: #8561 Closes: #8559 Co-authored-by: Athan Reines <kgryte@gmail.com> Reviewed-by: Athan Reines <kgryte@gmail.com>
1 parent d7f19cc commit f5f8c09

File tree

3 files changed

+36
-26
lines changed
  • lib/node_modules/@stdlib
    • _tools
      • eslint/rules/jsdoc-ordered-list-marker-style/lib
      • lint/license-header-glob/lib
    • assert/is-enumerable-property/examples

3 files changed

+36
-26
lines changed

lib/node_modules/@stdlib/_tools/eslint/rules/jsdoc-ordered-list-marker-style/lib/main.js

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,29 @@ var DOPTS = {
3737
};
3838

3939

40+
// FUNCTIONS //
41+
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+
62+
4063
// MAIN //
4164

4265
/**
@@ -117,26 +140,6 @@ function main( context ) {
117140
}
118141
}
119142

120-
/**
121-
* Copies AST node location info.
122-
*
123-
* @private
124-
* @param {Object} loc - AST node location
125-
* @returns {Object} copied location info
126-
*/
127-
function copyLocationInfo( loc ) {
128-
return {
129-
'start': {
130-
'line': loc.start.line,
131-
'column': loc.start.column
132-
},
133-
'end': {
134-
'line': loc.end.line,
135-
'column': loc.end.column
136-
}
137-
};
138-
}
139-
140143
/**
141144
* Reports an error message.
142145
*

lib/node_modules/@stdlib/_tools/lint/license-header-glob/lib/sync.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ var debug = logger( 'lint:license-header-glob:sync' );
5656
* };
5757
*
5858
* var errs = lint( opts );
59-
* // returns [...]
59+
* // e.g., returns [...]
6060
*/
6161
function lint( options ) {
6262
var names;

lib/node_modules/@stdlib/assert/is-enumerable-property/examples/index.js

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,14 @@
1616
* limitations under the License.
1717
*/
1818

19-
/* eslint-disable object-curly-newline */
20-
2119
'use strict';
2220

2321
var isEnumerableProperty = require( './../lib' );
2422

25-
var bool = isEnumerableProperty( { 'a': 'b' }, 'a' );
23+
var obj = {
24+
'a': 'b'
25+
};
26+
var bool = isEnumerableProperty( obj, 'a' );
2627
console.log( bool );
2728
// => true
2829

@@ -50,10 +51,16 @@ bool = isEnumerableProperty( void 0, 'a' );
5051
console.log( bool );
5152
// => false
5253

53-
bool = isEnumerableProperty( { 'null': false }, null );
54+
obj = {
55+
'null': false
56+
};
57+
bool = isEnumerableProperty( obj, null );
5458
console.log( bool );
5559
// => true
5660

57-
bool = isEnumerableProperty( { '[object Object]': false }, {} );
61+
obj = {
62+
'[object Object]': false
63+
};
64+
bool = isEnumerableProperty( obj, {} );
5865
console.log( bool );
5966
// => true

0 commit comments

Comments
 (0)