Skip to content

Add rule no-done-twice to reject multiple done() calls - #453

Merged
lo1tuma merged 6 commits into
mainfrom
add-no-done-twice
May 25, 2026
Merged

Add rule no-done-twice to reject multiple done() calls#453
lo1tuma merged 6 commits into
mainfrom
add-no-done-twice

Conversation

@lo1tuma

@lo1tuma lo1tuma commented May 24, 2026

Copy link
Copy Markdown
Owner

Add a new mocha/no-done-twice rule to report repeated completion of the same Mocha callback.
Enable the rule in the recommended config and document the expected callback style.

@lo1tuma lo1tuma changed the title Add rule to reject multiple done() calls Add rule no-done-twice to reject multiple done() calls May 24, 2026
@lo1tuma
lo1tuma force-pushed the add-no-done-twice branch 2 times, most recently from 0338d08 to 68aecae Compare May 25, 2026 02:02
lo1tuma added 5 commits May 25, 2026 10:01
Report repeated completion of the same Mocha callback in a single control-flow block.
Enable the rule in the recommended config and document the expected callback style.
Track callback aliases and one-shot delegation across code paths.
Cover renamed callbacks, branch-sensitive completion, and delegated completion cases in rule tests.
Add exact const alias cases for no-done-twice so callback renaming coverage matches the rule behavior.
@lo1tuma
lo1tuma force-pushed the add-no-done-twice branch from 3a63d50 to 4f3cc25 Compare May 25, 2026 08:01
@lo1tuma
lo1tuma merged commit 3c47ebf into main May 25, 2026
4 checks passed
@lo1tuma
lo1tuma deleted the add-no-done-twice branch May 25, 2026 08:12
lo1tuma added a commit that referenced this pull request Jul 17, 2026
Add rule no-done-twice to reject multiple done() calls
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant