Skip to content

Commit

Permalink
chore: resolve lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Planeshifter committed Jul 23, 2023
1 parent b94a0da commit 6dcf3b0
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 18 deletions.
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/function/ctor/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
* var v = add( 1, 2 );
* // returns 3
*/
var Fcn = Function;
var Fcn = Function; // eslint-disable-line stdlib/require-globals


// EXPORTS //
Expand Down
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/function/ctor/test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ tape( 'main export is a function', function test( t ) {
});

tape( 'the main export is the `Function` global', function test( t ) {
t.strictEqual( Fcn, Function, 'returns expected value' );
t.strictEqual( Fcn, Function, 'returns expected value' ); // eslint-disable-line stdlib/require-globals
t.end();
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ var validate = require( './../lib/validate.js' );

tape( 'main export is a function', function test( t ) {
t.ok( true, __filename );
t.equal( typeof validate, 'function', 'main export is a function' );
t.strictEqual( typeof validate, 'function', 'main export is a function' );
t.end();
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ var OxDFFF = 0xDFFF|0; // 57343
* - UTF-16 encoding uses one 16-bit unit for non-surrogates (U+0000 to U+D7FF and U+E000 to U+FFFF).
* - UTF-16 encoding uses two 16-bit units (surrogate pairs) for U+10000 to U+10FFFF and encodes U+10000-U+10FFFF by subtracting 0x10000 from the code point, expressing the result as a 20-bit binary, and splitting the 20 bits of 0x0-0xFFFFF as upper and lower 10-bits. The respective 10-bits are stored in two 16-bit words: a high and a low surrogate.
*
*
* @param {string} str - input string
* @param {integer} idx - position
* @param {boolean} backward - backward iteration for low surrogates
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
*
* The algorithm runs in `O(log_2(n))` compared to `O(n)`.
*
*
* @private
* @param {string} str - string to repeat
* @param {NonNegativeInteger} n - number of times to repeat the string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
var bench = require( '@stdlib/bench' );
var randu = require( '@stdlib/random/base/randu' );
var floor = require( '@stdlib/math/base/special/floor' );
var isString = require( '@stdlib/assert/is-string' ).isPrimitive;
var pow = require( '@stdlib/math/base/special/pow' );
var UNICODE_MAX = require( '@stdlib/constants/unicode/max' );
var pkg = require( './../package.json' ).name;
Expand All @@ -33,7 +32,7 @@ var fromCodePoint = require( './../lib' );
// VARIABLES //

var opts = {
'skip': ( typeof String.fromCodePoint !== 'function' )
'skip': ( typeof String.fromCodePoint !== 'function' ) // eslint-disable-line node/no-unsupported-features/es-builtins
};


Expand Down Expand Up @@ -108,7 +107,7 @@ function main() {
f = createBenchmark( fromCodePoint, len );
bench( pkg+'::apply:len='+len, f );

f = createBenchmark( String.fromCodePoint, len );
f = createBenchmark( String.fromCodePoint, len ); // eslint-disable-line node/no-unsupported-features/es-builtins
bench( pkg+'::apply,built-in:len='+len, opts, f );
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ var fromCodePoint = require( './../lib' );
// VARIABLES //

var opts = {
'skip': ( typeof String.fromCodePoint !== 'function' )
'skip': ( typeof String.fromCodePoint !== 'function' ) // eslint-disable-line node/no-unsupported-features/es-builtins
};


Expand Down Expand Up @@ -67,7 +67,7 @@ bench( pkg+'::built-in', opts, function benchmark( b ) {
b.tic();
for ( i = 0; i < b.iterations; i++ ) {
x = floor( randu() * UNICODE_MAX );
out = String.fromCodePoint( x );
out = String.fromCodePoint( x ); // eslint-disable-line node/no-unsupported-features/es-builtins
if ( typeof out !== 'string' ) {
b.fail( 'should return a string' );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ var Ox3FF = 1023|0;
* - UTF-16 encoding uses one 16-bit unit for non-surrogates (U+0000 to U+D7FF and U+E000 to U+FFFF).
* - UTF-16 encoding uses two 16-bit units (surrogate pairs) for U+10000 to U+10FFFF and encodes U+10000-U+10FFFF by subtracting 0x10000 from the code point, expressing the result as a 20-bit binary, and splitting the 20 bits of 0x0-0xFFFFF as upper and lower 10-bits. The respective 10-bits are stored in two 16-bit words: a high and a low surrogate.
*
*
* @param {...NonNegativeInteger} args - sequence of code points
* @throws {Error} must provide either an array-like object of code points or one or more code points as separate arguments
* @throws {TypeError} a code point must be a nonnegative integer
Expand Down
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/string/remove-first/test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ tape( 'the function returns the original string if provided zero as the second a
});

tape( 'the function removes the first `n` characters of a given string if provided a second argument', function test( t ) {
var out;
var out;

out = removeFirst( 'hello world', 1 );
t.strictEqual( out, 'ello world', 'removes first character' );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ var BOM = 65279;
* [1]: https://en.wikipedia.org/wiki/Byte_order_mark#UTF-8
* [2]: http://es5.github.io/#x4.3.16
*
*
* @param {string} str - input string
* @throws {TypeError} must provide a string primitive
* @returns {string} string with BOM removed
Expand Down
8 changes: 4 additions & 4 deletions lib/node_modules/@stdlib/string/reverse/test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ tape( 'the function reverses a string', function test( t ) {
'H\u0339\u0319\u0326\u032E\u0349\u0329\u0317\u0317\u0367\u0307\u030F\u030A\u033EE\u0368\u0346\u0352\u0306\u036E\u0303\u034F\u0337\u032E\u0323\u032B\u0324\u0323 \u0335\u031E\u0339\u033B\u0300\u0309\u0313\u036C\u0351\u0361\u0345C\u036F\u0302\u0350\u034F\u0328\u031B\u0354\u0326\u031F\u0348\u033BO\u031C\u034E\u034D\u0359\u035A\u032C\u031D\u0323\u033D\u036E\u0350\u0357\u0300\u0364\u030D\u0300\u0362M\u0334\u0321\u0332\u032D\u034D\u0347\u033C\u031F\u032F\u0326\u0309\u0312\u0360\u1E1A\u031B\u0319\u031E\u032A\u0317\u0365\u0364\u0369\u033E\u0351\u0314\u0350\u0345\u1E6E\u0334\u0337\u0337\u0317\u033C\u034D\u033F\u033F\u0313\u033D\u0350H\u0319\u0319\u0314\u0304\u035C',
'六书/六書',
'กิิก้้ก็็ก็็กิิก้้ก็็กิิก้้กิิก้้ก็็ก็็กิิก้้ก็็กิิก้้',
'\u{1112}\u{1161}\u{11AB}',
'\u{D55C}',
'\u{1112}\u{1161}\u{11AB}', // eslint-disable-line node/no-unsupported-features/es-syntax

This comment has been minimized.

Copy link
@kgryte

kgryte Jul 24, 2023

Member

We need to update these tests in order to support environments which don't support this feature. E.g., by having a special test block which is guarded by opts.

'\u{D55C}', // eslint-disable-line node/no-unsupported-features/es-syntax
'เ❄︎நி'
];

Expand All @@ -105,8 +105,8 @@ tape( 'the function reverses a string', function test( t ) {
'H\u0319\u0319\u0314\u0304\u035C\u1E6E\u0334\u0337\u0337\u0317\u033C\u034D\u033F\u033F\u0313\u033D\u0350\u1E1A\u031B\u0319\u031E\u032A\u0317\u0365\u0364\u0369\u033E\u0351\u0314\u0350\u0345M\u0334\u0321\u0332\u032D\u034D\u0347\u033C\u031F\u032F\u0326\u0309\u0312\u0360O\u031C\u034E\u034D\u0359\u035A\u032C\u031D\u0323\u033D\u036E\u0350\u0357\u0300\u0364\u030D\u0300\u0362C\u036F\u0302\u0350\u034F\u0328\u031B\u0354\u0326\u031F\u0348\u033B \u0335\u031E\u0339\u033B\u0300\u0309\u0313\u036C\u0351\u0361\u0345E\u0368\u0346\u0352\u0306\u036E\u0303\u034F\u0337\u032E\u0323\u032B\u0324\u0323H\u0339\u0319\u0326\u032E\u0349\u0329\u0317\u0317\u0367\u0307\u030F\u030A\u033E',
'書六/书六',
'ก้้กิิก็็ก้้กิิก็็ก็็ก้้กิิก้้กิิก็็ก้้กิิก็็ก็็ก้้กิิ',
'\u{1112}\u{1161}\u{11AB}',
'\u{D55C}',
'\u{1112}\u{1161}\u{11AB}', // eslint-disable-line node/no-unsupported-features/es-syntax

This comment has been minimized.

Copy link
@kgryte

kgryte Jul 24, 2023

Member

Same comment, as above.

'\u{D55C}', // eslint-disable-line node/no-unsupported-features/es-syntax
'நி❄︎เ'

];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ var Ox10000 = 65536|0;
* 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
* ```
*
*
* @param {string} str - string to convert
* @throws {TypeError} must provide a string
* @returns {Array} array of integers
Expand Down

0 comments on commit 6dcf3b0

Please sign in to comment.