Skip to content

build: restore benchmark ESLint rule overrides - #16393

Merged
kgryte merged 1 commit into
developfrom
philipp/restore-eslint-benchmark-overrides
Oct 31, 2026
Merged

kgryte merged 1 commit into
developfrom
philipp/restore-eslint-benchmark-overrides

Conversation

@Planeshifter

Copy link
Copy Markdown
Member

Restores benchmark linting behavior lost during the flat-config migration.

Description

What is the purpose of this pull request?

This pull request:

  • disables stdlib/jsdoc-private-annotation, stdlib/jsdoc-doctest, and stdlib/no-unnecessary-nested-functions for benchmark JavaScript files.
  • enables stdlib/no-bench-string-concat for benchmark descriptions.
  • restores the four overrides from the legacy benchmark configuration at commit f6df0741b98.

Without the stdlib/jsdoc-doctest override, linting initializes the rule and evaluates the entire file in a VM. This can start the benchmark harness during CLI linting or editor integration, even before processing any JSDoc examples. Restoring the override prevents that execution.

Related Issues

Does this pull request have any related issues?

This pull request has the following related issues:

Reference Packages

Did the content of this pull request follow one or more existing packages? Answering is optional.

This pull request followed these packages:

What carried over from the reference(s)?

  • All four benchmark rule overrides and their original severity levels.

What differed, or what did you have to work out yourself?

  • Applied the overrides in the existing flat-config benchmark entry and verified the editor-style lintText() execution behavior, including nested benchmark paths.

Questions

Any questions for reviewers of this pull request?

No.

Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

Validation:

  • Reproduced top-level benchmark execution on the unmodified configuration using ESLint.lintText() with a harmless temporary-file marker.
  • Verified benchmark and nested benchmark paths no longer execute that code after restoring the overrides.
  • Verified source-file doctest execution remains enabled.
  • Verified benchmark-description concatenation is reported and format() is accepted by stdlib/no-bench-string-concat.
  • Linted the modified configuration and a representative array/fixed-endian-factory benchmark: zero errors; one existing warning on the configuration's path import.
  • git diff --check, normal pre-commit checks, and the pre-push dependency license check passed.

Checklist

Please ensure the following tasks are completed before submitting this pull request.

AI Assistance

When authoring the changes proposed in this PR, did you use any kind of AI assistance?

  • Yes
  • No

If you answered "yes" above, how did you use AI assistance?

  • Code generation (e.g., when writing an implementation or fixing a bug)
  • Test/benchmark generation
  • Documentation (including examples)
  • Research and understanding

Disclosure

If you answered "yes" to using AI assistance, please provide a short disclosure indicating how you used AI assistance. This helps reviewers determine how much scrutiny to apply when reviewing your contribution. Example disclosures: "This PR was written primarily by Claude Code." or "I consulted ChatGPT to understand the codebase, but the proposed changes were fully authored manually by myself.".

This PR was written primarily by OpenAI Codex under human direction, including investigation, implementation, validation, and the PR description.


@stdlib-js/reviewers

---
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: 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
---
@Planeshifter
Planeshifter marked this pull request as ready for review October 31, 2026 02:22
@Planeshifter
Planeshifter requested review from a team and kgryte and a balanced review from Copilot October 31, 2026 02:22

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

There are no active review issues for the benchmark-specific ESLint override restoration.

No open issues 🎉

What changed in this PR

Restores benchmark-specific ESLint overrides omitted during the flat-config migration in #10973, preventing doctest linting from executing benchmark files.

Changes:

  • Disables private-annotation, doctest, and unnecessary-nested-function rules for benchmark JavaScript files.
  • Restores errors for string concatenation in benchmark descriptions.
File Description
eslint.config.js Restores four benchmark rule overrides with their legacy severity levels.

Review effort: Balanced

@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Oct 31, 2026
@kgryte kgryte removed the Needs Review A pull request which needs code review. label Oct 31, 2026
@kgryte
kgryte merged commit aead92f into develop Oct 31, 2026
35 checks passed
@kgryte
kgryte deleted the philipp/restore-eslint-benchmark-overrides branch October 31, 2026 02:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants