-
-
Notifications
You must be signed in to change notification settings - Fork 771
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
Update main.js #6427
base: develop
Are you sure you want to change the base?
Update main.js #6427
Conversation
Issue: Using new Array() violates the stdlib/no-new-array rule. Signed-off-by: VEER RAJ <136178369+VeerRaj-007@users.noreply.github.com>
Signed-off-by: VEER RAJ <136178369+VeerRaj-007@users.noreply.github.com>
Coverage Report
The above coverage report was generated for the changes in this PR. |
var i; | ||
if ( error ) { | ||
return done( error ); | ||
} | ||
nargs = arguments.length; | ||
args = new Array( nargs ); | ||
args[ 0 ] = null; | ||
const args = [null]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't use const
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @kgryte ,
Thank you for the feedback. I understand that "const" isn't typically used in this context. I'll adjust my code accordingly to align with the project's coding conventions.
Could you please clarify if there are specific patterns or alternatives you recommend for variable declarations in this situation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can start by actually looking at the file that you are editing.
@VeerRaj-007 What issue are you trying to resolve? |
I'm currently working on resolving stdlib/no-new-array linting rule violation in lib/node_modules/@stdlib/utils/async/if-then/lib/main.js (Line 122) which involves The original code uses new Array(nargs), which is flagged by ESLint. Please let me know if there are specific details you'd like me to provide or if there's anything else I should consider. |
Issue: Using new Array() violates the stdlib/no-new-array rule.
Resolves #{{TODO: add issue number}}.
Description
This pull request:
Related Issues
This pull request:
Questions
No.
Other
No.
Checklist
@stdlib-js/reviewers