Skip to content

build: restore test-file ESLint rule overrides - #16355

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

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

Conversation

@Planeshifter

Copy link
Copy Markdown
Member

Description

What is the purpose of this pull request?

This pull request:

  • restores the test-file ESLint rule overrides which were dropped when migrating to the flat config (build: delete legacy ESLint config and obsolete helpers (gh54 part VIII) #10974). The legacy etc/eslint/.eslintrc.tests.js configured the following rules for test files, but the **/test/**/*.js block in eslint.config.js did not carry them over:
    • stdlib/jsdoc-doctest: off
    • stdlib/no-unnecessary-nested-functions: off
    • stdlib/jsdoc-private-annotation: off
    • stdlib/no-single-property-require: off
    • no-new-wrappers: warn

Without disabling stdlib/jsdoc-doctest, ESLint evaluates each test file in a VM context, which runs the tape tests during linting and crashes ESLint on native tests when an addon is not available (e.g., TypeError: ellipj is not a function). Without disabling stdlib/no-unnecessary-nested-functions, the nested badValue helpers used throughout argument-validation tests are flagged. As a result, "Lint Changed Files" currently fails on any PR touching such test files (e.g., #14788, #15972, #16132, #16141, #16166).

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:

  • none (restores rules from the deleted etc/eslint/.eslintrc.tests.js)

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.

Verified locally: eslint lib/node_modules/@stdlib/math/base/special/ellipj/test/test.native.js exits with code 2 and prints TAP output on develop, and lints cleanly with this change.

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 Claude Code.


@stdlib-js/reviewers

🤖 Generated with Claude Code

The flat config migration dropped several rule overrides which the legacy `etc/eslint/.eslintrc.tests.js` applied to test files. Notably, without disabling `stdlib/jsdoc-doctest`, ESLint executes test files in a VM context, thus running the tests themselves and crashing on native tests when an addon is not available.

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: skipped
  - 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 requested a review from a team October 29, 2026 07:04
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Oct 29, 2026
@kgryte
kgryte merged commit 5b006a2 into develop Oct 29, 2026
30 checks passed
@kgryte
kgryte deleted the philipp/restore-eslint-test-overrides branch October 29, 2026 10:54
@kgryte kgryte removed the Needs Review A pull request which needs code review. label Oct 29, 2026
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.

3 participants