chore: fix JavaScript lint errors (issue #6355)#10698
chore: fix JavaScript lint errors (issue #6355)#10698chinanuj wants to merge 1 commit intostdlib-js:developfrom
Conversation
---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
- task: lint_filenames
status: passed
- task: lint_editorconfig
status: passed
- task: lint_markdown
status: na
- task: lint_package_json
status: na
- task: lint_repl_help
status: na
- task: lint_javascript_src
status: passed
- task: lint_javascript_cli
status: na
- task: lint_javascript_examples
status: na
- task: lint_javascript_tests
status: na
- task: lint_javascript_benchmarks
status: na
- task: lint_python
status: na
- task: lint_r
status: na
- task: lint_c_src
status: na
- task: lint_c_examples
status: na
- task: lint_c_benchmarks
status: na
- task: lint_c_tests_fixtures
status: na
- task: lint_shell
status: na
- task: lint_typescript_declarations
status: passed
- task: lint_typescript_tests
status: na
- task: lint_license_headers
status: passed
---
|
@chinanuj Hey, I suggest you re-read the issue again. The max-lines 300 limit you tried to fix here is just a warning, not an actual error. The real error was in-> |
|
Hey @lokesh, I actually looked for precision.js first, but it looks like that file doesn't even exist on the develop branch anymore (probably deleted/moved a while ago). Since the predicate_loops.js warning was still lingering in the codebase, I figured I'd just knock it out to help clean things up. As you can see below there is no scripts folder which was suppose to contain precision.js inside log2 folder .
|
|
Thank you for working on this pull request. However, we cannot accept your contribution as the issue this pull request seeks to resolve has already been addressed in a different pull request or commit. Thank you again for your interest in stdlib, and we look forward to reviewing your future contributions. |


Description
This PR addresses the
max-lineslinting failure inpredicate_loops.jsreported by the automated JavaScript lint workflow.The
predicate_loops.jsfile previously exceeded the strict 300-line limit. To resolve this without altering the core logic, I refactored the script by extracting four helper functions into their own files within thelib/directory:callbackBody->lib/callback_body.jssignatures->lib/signatures.jsupdateManifest->lib/update_manifest.jsupdateMainHeader->lib/update_main_header.jsThe main script was updated to
require()these modules, bringing it comfortably under the maximum line limit. All new files strictly adhere tostdlibproject conventions, including proper Apache license headers and the required// MODULES //,// MAIN //, and// EXPORTS //block dividers. Unused variables were also removed from the main script.Related Issues
resolves #6355
Checklist