Skip to content

Commit b21968f

Browse files
committed
Ensure early return for addons and resolve lint errors
1 parent 5a7fbbe commit b21968f

File tree

14 files changed

+17
-12
lines changed

14 files changed

+17
-12
lines changed

lib/node_modules/@stdlib/_tools/eslint/rules/require-file-extensions/lib/main.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,10 @@ function main( context ) {
118118
parts = path.parse( requirePath );
119119

120120
// If the path cannot be resolved, we report an error with the exception of Node.js native add-ons as they may not have been built yet:
121-
if ( resolved instanceof Error && parts.ext !== '.node' ) {
121+
if ( resolved instanceof Error ) {
122+
if ( parts.ext === '.node' ) {
123+
return;
124+
}
122125
return report( node, 'cannot resolve module: "'+requirePath+'"' );
123126
}
124127
resolved = path.parse( resolved );

lib/node_modules/@stdlib/assert/is-method-in/lib/main.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
// MODULES //
2222

2323
var isFunction = require( '@stdlib/assert/is-function' );
24+
var Object = require( '@stdlib/object/ctor' );
2425

2526

2627
// MAIN //

lib/node_modules/@stdlib/constants/float32/pinf/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ var bool = ( FLOAT32_PINF === Infinity );
5454
var FLOAT32_PINF = require( '@stdlib/constants/float32/pinf' );
5555

5656
console.log( FLOAT32_PINF );
57-
// => +Infinity
57+
// => Infinity
5858
```
5959

6060
</section>

lib/node_modules/@stdlib/constants/float32/pinf/examples/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@
2121
var FLOAT32_PINF = require( './../lib' );
2222

2323
console.log( FLOAT32_PINF );
24-
// => +infinity
24+
// => Infinity

lib/node_modules/@stdlib/datasets/moby-dick/scripts/to_json.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ var RE_FIRST_TWO_LINES = /^.*\n\n/;
4343
* Main execution sequence.
4444
*
4545
* @private
46+
* @throws {Error} unexpected file content
4647
*/
4748
function main() {
4849
var fpath;

lib/node_modules/@stdlib/regexp/dirname-posix/test/test.main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ var reDirnamePosix = require( './../lib/main.js' );
2828

2929
tape( 'main export is a function', function test( t ) {
3030
t.ok( true, __filename );
31-
t.equal( reDirnamePosix instanceof Function, true, 'main export is a function' );
31+
t.equal( typeof reDirnamePosix, 'function', 'main export is a function' );
3232
t.end();
3333
});
3434

lib/node_modules/@stdlib/regexp/dirname-windows/test/test.main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ var reDirnameWindows = require( './../lib/main.js' );
2828

2929
tape( 'main export is a function', function test( t ) {
3030
t.ok( true, __filename );
31-
t.equal( reDirnameWindows instanceof Function, true, 'main export is a function' );
31+
t.equal( typeof reDirnameWindows, 'function', 'main export is a function' );
3232
t.end();
3333
});
3434

lib/node_modules/@stdlib/regexp/dirname/test/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ proxyquire = proxyquire.noPreserveCache();
3434

3535
tape( 'main export is a function', function test( t ) {
3636
t.ok( true, __filename );
37-
t.equal( reDirname instanceof Function, true, 'main export is a function' );
37+
t.equal( typeof reDirname, 'function', 'main export is a function' );
3838
t.end();
3939
});
4040

lib/node_modules/@stdlib/regexp/extname-posix/test/test.main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ var reExtnamePosix = require( './../lib/main.js' );
2828

2929
tape( 'main export is a function', function test( t ) {
3030
t.ok( true, __filename );
31-
t.equal( reExtnamePosix instanceof Function, true, 'main export is a function' );
31+
t.equal( typeof reExtnamePosix, 'function', 'main export is a function' );
3232
t.end();
3333
});
3434

lib/node_modules/@stdlib/regexp/extname-windows/test/test.main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ var reExtnameWindows = require( './../lib/main.js' );
2828

2929
tape( 'main export is a function', function test( t ) {
3030
t.ok( true, __filename );
31-
t.equal( reExtnameWindows instanceof Function, true, 'main export is a function' );
31+
t.equal( typeof reExtnameWindows, 'function', 'main export is a function' );
3232
t.end();
3333
});
3434

lib/node_modules/@stdlib/regexp/extname/test/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ proxyquire = proxyquire.noPreserveCache();
3434

3535
tape( 'main export is a function', function test( t ) {
3636
t.ok( true, __filename );
37-
t.equal( reExtname instanceof Function, true, 'main export is a function' );
37+
t.equal( typeof reExtname, 'function', 'main export is a function' );
3838
t.end();
3939
});
4040

lib/node_modules/@stdlib/regexp/function-name/test/test.main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ var reFunctionName = require( './../lib/main.js' );
3030

3131
tape( 'main export is a function', function test( t ) {
3232
t.ok( true, __filename );
33-
t.equal( reFunctionName instanceof Function, true, 'main export is a function' );
33+
t.equal( typeof reFunctionName, 'function', 'main export is a function' );
3434
t.end();
3535
});
3636

lib/node_modules/@stdlib/regexp/regexp/test/test.main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ var reRegExp = require( './../lib/main.js' );
2828

2929
tape( 'main export is a function', function test( t ) {
3030
t.ok( true, __filename );
31-
t.equal( reRegExp instanceof Function, true, 'main export is a function' );
31+
t.equal( typeof reRegExp, 'function', 'main export is a function' );
3232
t.end();
3333
});
3434

lib/node_modules/@stdlib/regexp/unc-path/test/test.main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ var reUncPath = require( './../lib/main.js' );
2828

2929
tape( 'main export is a function', function test( t ) {
3030
t.ok( true, __filename );
31-
t.equal( reUncPath instanceof Function, true, 'main export is a function' );
31+
t.equal( typeof reUncPath, 'function', 'main export is a function' );
3232
t.end();
3333
});
3434

0 commit comments

Comments
 (0)