test(linter): Add more tests for the eslint/no-empty-function rule.#19392
test(linter): Add more tests for the eslint/no-empty-function rule.#19392graphite-app[bot] merged 1 commit intomainfrom
eslint/no-empty-function rule.#19392Conversation
There was a problem hiding this comment.
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/failtest cases forno-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. |
Merging this PR will not alter performance
Comparing Footnotes
|
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.
ab8ab4f to
ffb2c06
Compare
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
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. |

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.