Skip to content

Commit 3894b36

Browse files
committed
Update workflows and resolve lint errors
1 parent 3d388e9 commit 3894b36

File tree

20 files changed

+41
-18
lines changed

20 files changed

+41
-18
lines changed

.github/workflows/lint_changed_files.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,13 @@ jobs:
188188
make lint-python-files FILES="${files}"
189189
fi
190190
191+
# Setup R:
192+
- name: 'Setup R'
193+
if: success() || failure()
194+
uses: r-lib/actions/setup-r@v2
195+
with:
196+
r-version: '3.5.3'
197+
191198
# Lint R files:
192199
- name: 'Lint R files'
193200
if: success() || failure()

.github/workflows/lint_random_files.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,9 +283,10 @@ jobs:
283283
284284
# Setup R:
285285
- name: 'Setup R'
286+
if: ( github.event.inputs.r != 'false' ) && ( success() || failure() )
286287
uses: r-lib/actions/setup-r@v2
287288
with:
288-
r-version: '3.5.3' # The R version to download (if necessary) and use.
289+
r-version: '3.5.3'
289290

290291
# Lint R files:
291292
- name: 'Lint R files'

lib/node_modules/@stdlib/_tools/github/rank-users/lib/validate.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@ function validate( opts, options ) {
5252
if ( hasOwnProp( options, 'token' ) ) {
5353
opts.token = options.token;
5454
if ( !isString( opts.token ) ) {
55-
return new TypeError( format( 'invalid option. `%s` option must be a string. Option: `%s`.', 'token', opts.token ) );
55+
return new TypeError( format( 'invalid option. `%s` option must be a string. Option: `%s`.', 'token', opts.token ) );
5656
}
5757
}
5858
if ( hasOwnProp( options, 'useragent' ) ) {
5959
opts.useragent = options.useragent;
6060
if ( !isString( opts.useragent ) ) {
61-
return new TypeError( format( 'invalid option. `%s` option must be a string. Option: `%s`.', 'useragent', opts.useragent ) );
61+
return new TypeError( format( 'invalid option. `%s` option must be a string. Option: `%s`.', 'useragent', opts.useragent ) );
6262
}
6363
}
6464
if ( hasOwnProp( options, 'method' ) ) {

lib/node_modules/@stdlib/_tools/licenses/header/lib/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ var header = require( './header.js' );
5151
* 'year': 2018,
5252
* 'copyright': 'The Stdlib Authors'
5353
* };
54-
* var header = licenseHeader( 'Apache-2.0', 'js', opts );
54+
* var out = licenseHeader( 'Apache-2.0', 'js', opts );
5555
* // returns <string>
5656
*/
5757
function licenseHeader( license, type, options ) {

lib/node_modules/@stdlib/_tools/scripts/create_namespace_types.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ var RE_EOL = require( '@stdlib/regexp/eol' ).REGEXP;
3333
var removePunctuation = require( '@stdlib/string/remove-punctuation' );
3434
var readJSON = require( '@stdlib/fs/read-json' ).sync;
3535
var replace = require( '@stdlib/string/replace' );
36-
var camelcase = require( '@stdlib/string/camelcase' );
3736
var currentYear = require( '@stdlib/time/current-year' );
3837
var rootDir = require( '@stdlib/_tools/utils/root-dir' );
3938

@@ -205,7 +204,7 @@ function create( fullPath ) {
205204
// Use existing copyright year from definition file if available...
206205
defFile = fs.readFileSync( defFilePath, 'utf8' );
207206
match = defFile.match( RE_COPYRIGHT_YEAR );
208-
copyrightYear = match ? match[ 1 ] : currentYear();
207+
copyrightYear = ( match ) ? match[ 1 ] : currentYear();
209208
} else {
210209
// Use current year as copyright year:
211210
copyrightYear = currentYear();

lib/node_modules/@stdlib/assert/instance-of/benchmark/benchmark.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
var bench = require( '@stdlib/bench' );
2424
var isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;
25+
var Object = require( '@stdlib/object/ctor' );
2526
var pkg = require( './../package.json' ).name;
2627
var instanceOf = require( './../lib' );
2728

@@ -35,7 +36,7 @@ bench( pkg, function benchmark( b ) {
3536

3637
vals = [
3738
new Date(),
38-
new RegExp( '.*' ),
39+
new RegExp( '.*' ), // eslint-disable-line prefer-regex-literals
3940
new Array( 10 ),
4041
{},
4142
'5',
@@ -65,7 +66,7 @@ bench( pkg+'::built-in', function benchmark( b ) {
6566

6667
vals = [
6768
new Date(),
68-
new RegExp( '.*' ),
69+
new RegExp( '.*' ), // eslint-disable-line prefer-regex-literals
6970
new Array( 10 ),
7071
{},
7172
'5',

lib/node_modules/@stdlib/assert/is-date-object/test/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ tape( 'the function returns `false` if not provided a `Date` object', function t
123123
[],
124124
{},
125125
/./,
126-
new RegExp( '.' ),
126+
new RegExp( '.' ), // eslint-disable-line prefer-regex-literals
127127
function noop() {},
128128
function Date() {}
129129
];

lib/node_modules/@stdlib/assert/is-falsy/benchmark/benchmark.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ bench( pkg, function benchmark( b ) {
4747
void 0,
4848
[],
4949
{},
50-
new RegExp( '.*' ),
50+
new RegExp( '.*' ), // eslint-disable-line prefer-regex-literals
5151
new Date(),
5252
function noop() {}
5353
];

lib/node_modules/@stdlib/assert/is-generator-object-like/test/es2015-generator/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
'use strict';
2020

21-
/* eslint-disable no-restricted-syntax */
21+
/* eslint-disable no-restricted-syntax, node/no-unsupported-features/es-syntax */
2222

2323
// MODULES //
2424

lib/node_modules/@stdlib/assert/is-generator-object/test/es2015-generator/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
'use strict';
2020

21-
/* eslint-disable no-restricted-syntax */
21+
/* eslint-disable no-restricted-syntax, node/no-unsupported-features/es-syntax */
2222

2323
// MODULES //
2424

0 commit comments

Comments
 (0)