Conversation
Symbol.toPrimitive comparison in the "@stdlib/symbol/to-primitive" test trips n/no-unsupported-features/es-builtins: the package's engines range is >=0.12.18 (pre-ES6) and the rule flags any bare Symbol.toPrimitive reference regardless of the runtime guard already in place. The access is already environment-safe -- opts.skip (from hasToPrimitiveSymbolSupport()) prevents the assertion from running where the symbol doesn't exist. Suppress with an inline eslint-disable-line, matching the same rule/scenario already handled this way in utils/property-descriptors/test/test.builtin.js and assert/is-number/test/test.object.js.
Contributor
|
👋 Hi there! 👋 And thank you for opening your first pull request! We will review it shortly. 🏃 💨 Getting Started
Next Steps
Running Tests LocallyYou can use # Run tests for all packages in the math namespace:
make test TESTS_FILTER=".*/@stdlib/math/.*"
# Run benchmarks for a specific package:
make benchmark BENCHMARKS_FILTER=".*/@stdlib/math/base/special/sin/.*"If you haven't heard back from us within two weeks, please ping us by tagging the "reviewers" team in a comment on this PR. If you have any further questions while waiting for a response, please join our Zulip community to chat with project maintainers and other community members. We appreciate your contribution! Documentation Links |
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 #15228.
Description
This pull request:
n/no-unsupported-features/es-builtinsflags the bareSymbol.toPrimitivereference inlib/node_modules/@stdlib/symbol/to-primitive/test/test.jsbecause the package's configuredenginesrange is>=0.12.18(pre-ES6). The access is already environment-safe — the test only runs the assertion whenopts.skip(fromhasToPrimitiveSymbolSupport()) isfalse— so this is a lint false positive, not a runtime bug.eslint-disable-line n/no-unsupported-features/es-builtinscomment on that line, matching the existing precedent for the same rule and the same "already feature-gated" scenario inutils/property-descriptors/test/test.builtin.jsandassert/is-number/test/test.object.js.Related Issues
This pull request has the following related issues:
Questions
No.
Other
No.
Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was written by Claude Code. It located the failing line from the CI log in #15228, found the existing
eslint-disable-line n/no-unsupported-features/es-builtinsprecedent elsewhere in the codebase for the identical rule/scenario, and applied the same one-line fix.@stdlib-js/reviewers