Closed
Description
openedon Jun 21, 2024
Description
This RFC proposes adding tooling support for warning when semicolons are omitted from examples in REPL text help files. For reference, semicolons are used to silence/suppress the display of return values in the REPL. As an example,
> function foo() { return 'bar'; }
> foo()
'bar'
The above should trigger a warning (or perhaps more strongly an error) to indicate that the function declaration should not be displayed as return output. Instead, the above should be
> function foo() { return 'bar'; };
> foo()
'bar'
Discussion of return value suppression can be found in the REPL developer guide: https://github.com/stdlib-js/stdlib/blob/481690174833259628032a259dbe7d26bbde807d/docs/repl_text.md#examples.
Related Issues
n/a
Questions
No.
Other
No.
Checklist
- I have read and understood the Code of Conduct.
- Searched for existing issues and pull requests.
- The issue name begins with
RFC:
.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment