Repository navigation
chore: fix JavaScript lint errors (issue #16126) - #16833
Aryan-Jangra07 wants to merge 2 commits into
Conversation
Return annotations such as `// => 'boop\ufeff'` were compared verbatim against the actual string, so any annotation using a `\uXXXX` escape for a non-printing character (e.g., a byte order mark) could never match. Ref: stdlib-js#16126 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --- 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_pkg_readmes status: na - task: lint_markdown_docs status: na - 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: passed - 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 ---
Disable `stdlib/eol-open-bracket-spacing` in the example, matching sibling packages such as `assert/is-data-property-in` and `assert/has-property`. Ref: stdlib-js#16126 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --- 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_pkg_readmes status: na - task: lint_markdown_docs status: na - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - 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 ---
|
👋 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 |
|
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! |
Resolves #16126.
Description
This pull request:
_tools/doctest/compare-valuesso that\uXXXXescape sequences in string return annotations are converted to their corresponding characters before comparison. Previously, an annotation such as// => 'boop'was compared verbatim against the actual output, which contains a literal (invisible) BOM, so it could never match. This was the cause of thestdlib/doctestfailures instring/remove-utf8-bom/examples/index.js. The example itself is left unchanged, and its output still includes the BOM, since the BOM is not at the start of those strings (as noted in chore: fix JavaScript lint errors (issue #16126) #16139 (comment))._tools/doctest/compare-valuesfor matching and non-matching annotations containing aescape.stdlib/eol-open-bracket-spacingto theeslint-disabledirective inassert/is-configurable-property-in/examples/index.js, matching sibling packages such asassert/is-data-property-inandassert/has-property.Related Issues
This pull request has the following related issues:
Reference Packages
This pull request followed these packages:
assert/is-data-property-inassert/has-propertyeslint-disabledirective for the example file.compare-valuesfix. Existing code already harmonizes\n,\tand\'for strings, so the Unicode escape handling was added alongside those.Questions
The same
stdlib/eol-open-bracket-spacingerror also shows up in otherassert/*-property-inexamples (e.g.,is-enumerable-property-in). I only touched the file listed in the issue. Happy to update the others here or in a follow-up if preferred.Other
The new
compare-valuestests fail without the fix and pass with it.make lint-javascript-filespasses for all changed files, and thestdlib/doctesterrors instring/remove-utf8-bom/README.mdare also resolved by the fix.@stdlib-js/reviewers