chore: fix JavaScript lint errors (issue #11685)#11692
Merged
kgryte merged 2 commits intostdlib-js:developfrom Apr 21, 2026
Merged
chore: fix JavaScript lint errors (issue #11685)#11692kgryte merged 2 commits intostdlib-js:developfrom
kgryte merged 2 commits intostdlib-js:developfrom
Conversation
Replace 'new Array( 5 )' with array literals of 5 'void 0' values in the 'math/strided/special/sin-by' ndarray test. The accessor short-circuits on 'v === void 0', so empty slots and explicit undefined slots produce identical sinBy output -- the test semantics are preserved while satisfying the 'stdlib/no-new-array' rule. PR-URL: https://github.com/stdlib-js/stdlib/pull/ Resolves: stdlib-js#11685
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
kgryte
reviewed
Apr 21, 2026
kgryte
reviewed
Apr 21, 2026
Co-authored-by: Athan <kgryte@gmail.com> Signed-off-by: Athan <kgryte@gmail.com>
kgryte
approved these changes
Apr 21, 2026
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.
Summary
Resolves #11685.
The
stdlib/no-new-arrayrule flagged two occurrences ofnew Array( 5 )inlib/node_modules/@stdlib/math/strided/special/sin-by/test/test.ndarray.js(lines 76 and 84). Both were constructing a 5-element sparse array to drive the accessor'sv === void 0guard.I replaced each with a 5-element array literal of
void 0values:The accessor short-circuits on
v === void 0, so whether a slot is absent (sparse) or explicitly undefined (dense) is indistinguishable tosinBy. The test's expected outputs remain identical and the assertions still pass.Changes
lib/node_modules/@stdlib/math/strided/special/sin-by/test/test.ndarray.js: swap twonew Array( 5 )calls for array literals.Related Issues
Checklist