chore: fix JavaScript lint errors (issue #10073) - #15313
Open
SIDDARTHAREDDY8 wants to merge 1 commit into
Open
SIDDARTHAREDDY8 wants to merge 1 commit into
SIDDARTHAREDDY8 wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #10073.
Description
This pull request:
lib/node_modules/@stdlib/_tools/remark/plugins/remark-run-javascript-examples/lib/index.js:stdlib/jsdoc-doctest: the@exampleblock asserted// => 'HELLO WORLD', but the annotated expression evaluates (in the doctest scope) to theremarkmodule export (unified'sprocessorfunction), so the displayed return value did not match the actual value. Replaced with the illustrative// e.g., => 'HELLO WORLD!'marker, consistent with the siblinglib/main.jsexample, which the doctest rule does not verify.stdlib/jsdoc-main-export: the rule requires the package self-requireto be the lastrequire(occurrence in the example text, but the Markdown fixture strings containrequire( "path" )after it. Movedvar run = require( '@stdlib/_tools/remark/plugins/remark-run-javascript-examples' );below the fixture so the self-require is the lastrequirecall.Related Issues
This pull request has the following related issues:
Questions
No.
Other
Verification performed locally:
stdlib/jsdoc-main-exportrule (fromlib/node_modules/@stdlib/_tools/eslint/rules/jsdoc-main-export) against the original file: reproduced the exact reported error at 21:1. After the fix: 0 errors.RE_ANNOTATIONpattern from thestdlib/jsdoc-doctestrule against the original example: 1 annotation matched (the failing one). After the fix: 0 annotations matched (// e.g., =>is illustrative-only, same convention aslib/main.js).node --checkpasses on the modified file.No.
Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was authored with AI assistance (Muse). The AI researched the two failing ESLint rules in the stdlib repository, reproduced both errors locally against the actual rule implementations, and generated the JSDoc example fix (require reordering and the illustrative
// e.g., =>marker). A human operator reviewed and verified the change before submission.