From 16e0915ac051e7ea2af1352b641923ad711d2326 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 22 May 2026 14:32:02 +0000 Subject: [PATCH] docs(remark-run-javascript-examples): correct jsdoc example The lint workflow (run 26260926243, 2026-05-22) failed on develop with two errors in the `@example` block of `index.js`. `stdlib/jsdoc-main-export` fired because the `str` array contained the string literal `'var path = require( "path" );'`, placing a `require(` substring in the description text after the main export's actual `require()` call. The rule scans with `lastIndexOf('require(')` on the raw description, so it treated the string literal as a trailing require and concluded the main export was not last. `stdlib/jsdoc-doctest` fired because the `// => 'HELLO WORLD'` comment annotated `remark().use(run).process()` as returning the string `'HELLO WORLD'`; the actual return value is the remark processor object. Remove the usage-section lines (eliminating the offending string literal) and drop the incorrect annotation. The example still demonstrates the plugin's core behaviour: processing markdown that contains a JavaScript examples section. Ref: https://github.com/stdlib-js/stdlib/actions/runs/26260926243 --- .../lib/index.js | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/lib/node_modules/@stdlib/_tools/remark/plugins/remark-run-javascript-examples/lib/index.js b/lib/node_modules/@stdlib/_tools/remark/plugins/remark-run-javascript-examples/lib/index.js index e85c8a843556..76a7c361e2da 100644 --- a/lib/node_modules/@stdlib/_tools/remark/plugins/remark-run-javascript-examples/lib/index.js +++ b/lib/node_modules/@stdlib/_tools/remark/plugins/remark-run-javascript-examples/lib/index.js @@ -28,24 +28,6 @@ * var run = require( '@stdlib/_tools/remark/plugins/remark-run-javascript-examples' ); * * var str = [ -* '
', -* '', -* '## Usage', -* '', -* '```javascript', -* 'var path = require( "path" );', -* '```', -* '', -* '#### path.posix.join( [...paths] )', -* '', -* '```javascript', -* 'var p = path.posix.join( "foo", "bar" );', -* '```', -* '', -* '
', -* '', -* '', -* '', * '
', * '', * '## Examples', @@ -60,7 +42,6 @@ * ]; * * remark().use( run ).process( str.join( '\n' ), done ); -* // => 'HELLO WORLD' * * function done( error ) { * if ( error ) {