Skip to content

Commit 5a7fbbe

Browse files
committed
Resolve lint errors and update examples
1 parent dd299d7 commit 5a7fbbe

19 files changed

Lines changed: 58 additions & 116 deletions

File tree

lib/node_modules/@stdlib/_tools/doctest/compare-values/examples/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121
var compareValues = require( './../lib' );
2222

2323
console.log( compareValues( true, 'false' ) );
24-
// => 'Displayed return value is `false`, but function returns `true` instead'
24+
// => 'Displayed return value is `false`, but expected `true` instead'
2525

2626
console.log( compareValues( 0.25, '0.26' ) );
27-
// => 'Displayed return value is `0.26`, but function returns `0.25` instead'
27+
// => 'Displayed return value is `0.26`, but expected `0.25` instead'
2828

2929
console.log( compareValues( 23, '23' ) );
3030
// => null

lib/node_modules/@stdlib/_tools/eslint/rules/jsdoc-blockquote-indentation/lib/main.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ var DOPTS = {
3737
'sloppy': true,
3838
'unwrap': true
3939
};
40+
var RE_BLOCKQUOTE = /([>])\s+/g;
4041
var rule;
4142

4243

@@ -166,7 +167,6 @@ function main( context ) {
166167
var spaces;
167168
var range;
168169
var str;
169-
var re;
170170

171171
range = [
172172
source.getIndexFromLoc( loc.start ),
@@ -179,8 +179,7 @@ function main( context ) {
179179
} else {
180180
spaces = repeat( ' ', setting - 1 );
181181
}
182-
re = new RegExp( '([>])\\s+', 'g' );
183-
str = replace( str, re, '$1' + spaces );
182+
str = replace( str, RE_BLOCKQUOTE, '$1' + spaces );
184183
return fixer.replaceTextRange( range, str );
185184
}
186185
}

lib/node_modules/@stdlib/_tools/eslint/rules/jsdoc-ordered-list-marker-value/test/test.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,3 @@ tape( 'the function does not validate non-JSDoc comments', function test( t ) {
8484
}
8585
t.end();
8686
});
87-

lib/node_modules/@stdlib/_tools/remark/plugins/remark-img-equations-src-urls/examples/index.js

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,18 @@ var toVFile = require( 'to-vfile' );
2323
var remark = require( 'remark' );
2424
var insertURLs = require( './../lib' );
2525

26-
var fpath;
27-
var vfile;
28-
var opts;
29-
var out;
30-
3126
// Load a Markdown file...
32-
fpath = join( __dirname, 'fixtures/simple.txt' );
33-
vfile = toVFile.readSync( fpath );
27+
var fpath = join( __dirname, 'fixtures/simple.txt' );
28+
var vfile = toVFile.readSync( fpath );
3429

3530
// Specify the directory containing equation images:
36-
opts = {
31+
var opts = {
3732
'dir': './doc/img/', // relative to Markdown file
3833
'prefix': '' // no prefix
3934
};
4035

4136
// Insert src URLs:
42-
out = remark().use( insertURLs, opts ).processSync( vfile );
37+
var out = remark().use( insertURLs, opts ).processSync( vfile );
4338

4439
// Output the results:
4540
console.log( out.contents );

lib/node_modules/@stdlib/_tools/remark/plugins/remark-img-equations/README.md

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -78,20 +78,15 @@ var remark = require( 'remark' );
7878
var readFileSync = require( '@stdlib/fs/read-file' ).sync;
7979
var insertEquations = require( '@stdlib/_tools/remark/plugins/remark-img-equations' );
8080

81-
var fpath;
82-
var opts;
83-
var file;
84-
var out;
85-
8681
// Load a Markdown file...
87-
fpath = join( __dirname, 'fixtures/simple.md' );
88-
opts = {
82+
var fpath = join( __dirname, 'fixtures/simple.md' );
83+
var opts = {
8984
'encoding': 'utf8'
9085
};
91-
file = readFileSync( fpath, opts );
86+
var file = readFileSync( fpath, opts );
9287

9388
// Insert equations:
94-
out = remark().use( insertEquations ).processSync( file );
89+
var out = remark().use( insertEquations ).processSync( file );
9590
```
9691

9792
</section>

lib/node_modules/@stdlib/_tools/remark/plugins/remark-img-equations/examples/index.js

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,15 @@ var join = require( 'path' ).join;
2323
var remark = require( 'remark' );
2424
var insertEquations = require( './../lib' );
2525

26-
var fpath;
27-
var opts;
28-
var file;
29-
var out;
30-
3126
// Load a Markdown file...
32-
fpath = join( __dirname, 'fixtures/simple.txt' );
33-
opts = {
27+
var fpath = join( __dirname, 'fixtures/simple.txt' );
28+
var opts = {
3429
'encoding': 'utf8'
3530
};
36-
file = readFileSync( fpath, opts );
31+
var file = readFileSync( fpath, opts );
3732

3833
// Insert equations:
39-
out = remark().use( insertEquations ).processSync( file );
34+
var out = remark().use( insertEquations ).processSync( file );
4035

4136
// Print the results:
4237
console.log( out.contents );

lib/node_modules/@stdlib/_tools/remark/plugins/remark-namespace-toc/README.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,12 @@ var toVFile = require( 'to-vfile' );
5757
var remark = require( 'remark' );
5858
var insertTOC = require( '@stdlib/_tools/remark/plugins/remark-namespace-toc' );
5959

60-
var fpath;
61-
var vfile;
62-
var out;
63-
6460
// Load a Markdown file...
65-
fpath = join( __dirname, 'examples', 'fixtures', 'README.md' );
66-
vfile = toVFile.readSync( fpath );
61+
var fpath = join( __dirname, 'examples', 'fixtures', 'README.md' );
62+
var vfile = toVFile.readSync( fpath );
6763

6864
// Insert table of contents:
69-
out = remark().use( insertTOC ).processSync( vfile );
65+
var out = remark().use( insertTOC ).processSync( vfile );
7066

7167
// Print the results:
7268
console.log( out.contents );

lib/node_modules/@stdlib/_tools/remark/plugins/remark-namespace-toc/examples/index.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,12 @@ var toVFile = require( 'to-vfile' );
2323
var remark = require( 'remark' );
2424
var insertTOC = require( './../lib' );
2525

26-
var fpath;
27-
var vfile;
28-
var out;
29-
3026
// Load a Markdown file...
31-
fpath = join( __dirname, 'fixtures', 'README.md' );
32-
vfile = toVFile.readSync( fpath );
27+
var fpath = join( __dirname, 'fixtures', 'README.md' );
28+
var vfile = toVFile.readSync( fpath );
3329

3430
// Insert table of contents:
35-
out = remark().use( insertTOC ).processSync( vfile );
31+
var out = remark().use( insertTOC ).processSync( vfile );
3632

3733
// Print the results:
3834
console.log( out.contents );

lib/node_modules/@stdlib/_tools/remark/plugins/remark-stdlib-related/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@ var vfile;
6262
var out;
6363

6464
// Load a Markdown file...
65-
fpath = join( __dirname, 'fixtures', '@stdlib', 'math', 'base', 'special', 'atan', 'README.md' );
66-
vfile = toVFile.readSync( fpath );
65+
var fpath = join( __dirname, 'fixtures', '@stdlib', 'math', 'base', 'special', 'atan', 'README.md' );
66+
var vfile = toVFile.readSync( fpath );
6767

6868
// Insert a "See Also" section of related `stdlib` packages:
69-
out = remark().use( seeAlso ).processSync( vfile );
69+
var out = remark().use( seeAlso ).processSync( vfile );
7070

7171
// Print the results:
7272
console.log( out.contents );

lib/node_modules/@stdlib/_tools/remark/plugins/remark-stdlib-related/examples/index.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,12 @@ var toVFile = require( 'to-vfile' );
2323
var remark = require( 'remark' );
2424
var seeAlso = require( './../lib' );
2525

26-
var fpath;
27-
var vfile;
28-
var out;
29-
3026
// Load a Markdown file...
31-
fpath = join( __dirname, 'fixtures', '@stdlib', 'math', 'base', 'special', 'atan', 'README.md' );
32-
vfile = toVFile.readSync( fpath );
27+
var fpath = join( __dirname, 'fixtures', '@stdlib', 'math', 'base', 'special', 'atan', 'README.md' );
28+
var vfile = toVFile.readSync( fpath );
3329

3430
// Insert a "See Also" section of related `stdlib` packages:
35-
out = remark().use( seeAlso ).processSync( vfile );
31+
var out = remark().use( seeAlso ).processSync( vfile );
3632

3733
// Print the results:
3834
console.log( out.contents );

0 commit comments

Comments
 (0)