-
-
Notifications
You must be signed in to change notification settings - Fork 762
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: fix JavaScript lint errors #6029
Conversation
Object is available globally in JS, this rule enforces explicit require() to ensure compatibility and clarity. Signed-off-by: JaySoni1 <jaygsoni14@gmail.com>
The linter suggests you should add a // throws <Error> comment to indicate the example throws an error, instead of pretending it returns an object. Signed-off-by: JaySoni1 <jaygsoni14@gmail.com>
Hello! Thank you for your contribution to stdlib. We noticed that the contributing guidelines acknowledgment is missing from your pull request. Here's what you need to do:
This acknowledgment confirms that you've read the guidelines, which include:
We can't review or accept contributions without this acknowledgment. Thank you for your understanding and cooperation. We look forward to reviewing your contribution! |
Hello! Thank you for your contribution to stdlib. We noticed that the contributing guidelines acknowledgment is missing from your pull request. Here's what you need to do:
This acknowledgment confirms that you've read the guidelines, which include:
We can't review or accept contributions without this acknowledgment. Thank you for your understanding and cooperation. We look forward to reviewing your contribution! |
Signed-off-by: Athan <kgryte@gmail.com>
lib/node_modules/@stdlib/utils/get-prototype-of/lib/polyfill.js
Outdated
Show resolved
Hide resolved
Signed-off-by: Athan <kgryte@gmail.com>
As the CI failure does not stem from changes introduced in this PR and tests pass, I'll go ahead and merge. |
Summary
This pull request fixes JavaScript lint errors identified in the automated JavaScript lint workflow.
Files Modified
lib/node_modules/@stdlib/utils/get-prototype-of/lib/polyfill.js
lib/node_modules/@stdlib/_tools/pkgs/deps/lib/sync.js
Details of Changes
1.
polyfill.js
Problem:
Object
was used without being loaded viarequire()
.Lint Error:
/home/runner/work/stdlib/stdlib/lib/node_modules/@stdlib/utils/get-prototype-of/lib/polyfill.js
45:22 error Object is used without loading it beforehand via require() stdlib/require-globals
Fix: Added the required
require
statement forObject
.Changes Made:
2.
sync.js
Problem: JSDoc example incorrectly showed a return example for a scenario that throws an error.
Lint Error:
/home/runner/work/stdlib/stdlib/lib/node_modules/@stdlib/_tools/pkgs/deps/lib/sync.js
43:1 error Encountered an error while running code: Cannot find module '/foo/bar/baz'. Did you mean to include a // throws <Error> annotation instead of // returns [{...}]? stdlib/jsdoc-doctest
Fix: Updated the JSDoc example annotation to correctly indicate an error is thrown.
Changes Made:
Checklist ✅
npm test
locally and all tests passed successfullypolyfill.js
andsync.js
Related Issues
Additional Notes