Skip to content

test(linter): Add more tests for the eslint/no-empty-function rule.#19392

Merged
graphite-app[bot] merged 1 commit intomainfrom
add-more-tests
Feb 14, 2026
Merged

test(linter): Add more tests for the eslint/no-empty-function rule.#19392
graphite-app[bot] merged 1 commit intomainfrom
add-more-tests

Conversation

@connorshea
Copy link
Member

This ports various tests from the original rule, all were added upstream in eslint/eslint@dcd95aa

Most of them pass, but a few needed to be commented out. All of this work was done manually, no Claude allowed because I didn't want to risk hallucinations.

See also #19391, which is about fixing the tests here that fail.

@connorshea connorshea requested a review from camc314 as a code owner February 14, 2026 22:14
Copilot AI review requested due to automatic review settings February 14, 2026 22:14
@github-actions github-actions bot added A-linter Area - Linter C-test Category - Testing. Code is missing test cases, or a PR is adding them labels Feb 14, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Expands the Oxlint test suite for the eslint/no-empty-function rule by porting additional upstream ESLint test cases, ensuring closer behavioral parity and broader coverage across function/method variants.

Changes:

  • Added many new pass/fail test cases for no-empty-function, including decorated/override/async/generator/getter/setter/constructor variants and additional option-alias coverage.
  • Updated the corresponding Insta snapshot to include diagnostics from the newly added failing cases.
  • Left a small set of upstream-derived cases commented out with TODOs where current Oxlint behavior differs (tracked separately).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
crates/oxc_linter/src/rules/eslint/no_empty_function.rs Ports a large set of upstream ESLint tests into the rule’s pass/fail cases (with a few known-difference TODOs).
crates/oxc_linter/src/snapshots/eslint_no_empty_function.snap Updates the stored snapshot output to match diagnostics produced by the newly added failing tests.

@codspeed-hq
Copy link

codspeed-hq bot commented Feb 14, 2026

Merging this PR will not alter performance

✅ 47 untouched benchmarks
⏩ 3 skipped benchmarks1


Comparing add-more-tests (ab8ab4f) with main (bbced8d)

Open in CodSpeed

Footnotes

  1. 3 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@camc314 camc314 self-assigned this Feb 14, 2026
@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Feb 14, 2026
Copy link
Contributor

camc314 commented Feb 14, 2026

Merge activity

…#19392)

This ports various tests from the original rule, all were added upstream in eslint/eslint@dcd95aa

Most of them pass, but a few needed to be commented out. All of this work was done manually, no Claude allowed because I didn't want to risk hallucinations.

See also #19391, which is about fixing the tests here that fail.
Copy link
Contributor

camc314 commented Feb 14, 2026


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@graphite-app graphite-app bot merged commit ffb2c06 into main Feb 14, 2026
21 checks passed
@graphite-app graphite-app bot deleted the add-more-tests branch February 14, 2026 22:50
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Feb 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-linter Area - Linter C-test Category - Testing. Code is missing test cases, or a PR is adding them

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants