-
-
Notifications
You must be signed in to change notification settings - Fork 903
Update main.js #6427
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
Conversation
Issue: Using new Array() violates the stdlib/no-new-array rule. Signed-off-by: VEER RAJ <[email protected]>
Signed-off-by: VEER RAJ <[email protected]>
Coverage Report
The above coverage report was generated for the changes in this PR. |
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. |
Thank you for working on this pull request. However, we cannot accept your contribution as this pull request does not follow project conventions. We place a high value on consistency throughout the stdlib codebase, and this pull request was found to significantly deviate from stdlib conventions. We encourage you to closely examine other packages in stdlib and attempt to emulate the practices and conventions found therein.
In short, the more effort you put in to ensure that your contribution looks and feels like stdlib—including variables names, bracket spacing, line breaks, etc—the more likely that your contribution will be reviewed and ultimately accepted. We encourage you to closely study the codebase before continuing to work on this pull request. Thank you again for your interest in stdlib, and we look forward to reviewing your future contributions. |
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