Skip to content

chore: fix JavaScript lint errors#11813

Merged
kgryte merged 1 commit intostdlib-js:developfrom
mvanhorn:fix/11803-nested-onDrain
Apr 27, 2026
Merged

chore: fix JavaScript lint errors#11813
kgryte merged 1 commit intostdlib-js:developfrom
mvanhorn:fix/11803-nested-onDrain

Conversation

@mvanhorn
Copy link
Copy Markdown
Contributor

Resolves #11803.

Description

Move `onDrain` out of `onCommand` in `lib/node_modules/@stdlib/repl/presentation/lib/commands/end.js` so it sits at the same scope as `onCommand`. `onDrain` only references `pres` from the outer `command` scope, so the nested form was unnecessary. The new layout matches the convention already used by `next.js`, `prev.js`, `last.js`, `jump.js`, and other sibling command files in the same directory.

Resolves the `stdlib/no-unnecessary-nested-functions` lint failure reported by the automated workflow (run 24970593105):

```
end.js
46:3 error Function 'onDrain' should be moved to outer function scope stdlib/no-unnecessary-nested-functions
```

Related Issues

Questions

No.

Other

No.

Checklist

AI Assistance

  • Yes

  • No

  • Code generation (e.g., when writing an implementation or fixing a bug)

Disclosure

This PR was written by Claude Code; I (the author) reviewed the diff against the project's existing sibling command files before submitting.


@stdlib-js/reviewers

Move onDrain out of onCommand in end.js so it sits at the same scope as
onCommand, matching the convention already used by next.js, prev.js,
last.js, jump.js, and friends. Resolves the
stdlib/no-unnecessary-nested-functions lint error reported by the
automated workflow.

Closes: stdlib-js#11803
@mvanhorn mvanhorn requested a review from a team April 27, 2026 10:04
@stdlib-bot stdlib-bot added REPL Issue or pull request specific to the project REPL. Needs Review A pull request which needs code review. Good First PR A pull request resolving a Good First Issue. labels Apr 27, 2026
@kgryte kgryte added difficulty: 1 Low degree of difficulty. Should be straightforward to implement and/or resolve. review: 5 and removed Needs Review A pull request which needs code review. labels Apr 27, 2026
@kgryte kgryte merged commit bb1eae9 into stdlib-js:develop Apr 27, 2026
101 of 102 checks passed
@kgryte
Copy link
Copy Markdown
Member

kgryte commented Apr 27, 2026

Thanks for fixing, @mvanhorn.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

difficulty: 1 Low degree of difficulty. Should be straightforward to implement and/or resolve. Good First PR A pull request resolving a Good First Issue. REPL Issue or pull request specific to the project REPL. review: 5

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix JavaScript lint errors

3 participants