Skip to content

Commit ddfeee0

Browse files
committed
Merge branch 'develop' of https://github.com/stdlib-js/stdlib into develop
2 parents dcdcece + e5bfb31 commit ddfeee0

File tree

122 files changed

+444
-210
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+444
-210
lines changed

dist/scripts/utils/bundle_dirs.js

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

2323
var path = require( 'path' );
24-
var stat = require( 'fs' ).statSync; // eslint-disable-line no-sync
24+
var stat = require( 'fs' ).statSync; // eslint-disable-line node/no-sync
2525
var readDir = require( '@stdlib/fs/read-dir' ).sync;
2626
var DIST_DIR = require( './dist_dir.js' );
2727

etc/eslint/.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ reports/
2929
# Node.js #
3030
###########
3131
/node_modules/
32+
!/**/node_modules/*
3233

3334
# Git #
3435
#######

etc/eslint/plugins/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
// ESLint plugins:
2222
var plugins = [
23+
'node',
2324
'stdlib'
2425
];
2526

etc/eslint/rules/best_practices.js

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,35 @@ rules[ 'curly' ] = 'error';
218218
*/
219219
rules[ 'default-case' ] = 'error';
220220

221+
/**
222+
* Always require a `default` clause to be last in a `switch` statement.
223+
*
224+
* @name default-case-last
225+
* @memberof rules
226+
* @type {string}
227+
* @default 'error'
228+
* @see [default-case]{@link http://eslint.org/docs/rules/default-case-last}
229+
*
230+
* @example
231+
* // Bad...
232+
* switch( foo ) {
233+
* default:
234+
* break;
235+
* case 1:
236+
* break;
237+
* }
238+
*
239+
* @example
240+
* // Good...
241+
* switch( foo ) {
242+
* case 1:
243+
* break;
244+
* default:
245+
* break;
246+
* }
247+
*/
248+
rules[ 'default-case-last' ] = 'error';
249+
221250
/**
222251
* Always require default parameters to be last.
223252
*
@@ -1237,6 +1266,25 @@ rules[ 'no-unused-expressions' ] = [ 'error', {
12371266
*/
12381267
rules[ 'no-unused-labels' ] = 'error';
12391268

1269+
/**
1270+
* Ensure there are no regular expression backreferences that always successfully match zero-length and cannot match anything else.
1271+
*
1272+
* @name no-useless-backreference
1273+
* @memberof rules
1274+
* @type {string}
1275+
* @default 'error'
1276+
* @see [no-useless-backreference]{@link http://eslint.org/docs/rules/no-useless-backreference}
1277+
*
1278+
* @example
1279+
* // Bad...
1280+
* var RE = /\1(a)/; // forward reference to (a);
1281+
*
1282+
* @example
1283+
* // Good...
1284+
* var RE = /(a)\1/; // reference to (a)
1285+
*/
1286+
rules[ 'no-useless-backreference' ] = 'error';
1287+
12401288
/**
12411289
* Never allow using `call` or `apply` when a normal function invocation will suffice.
12421290
*

0 commit comments

Comments
 (0)