Skip to content

Add no-code-after-done rule to reject code after done() - #451

Merged
lo1tuma merged 3 commits into
mainfrom
add-no-code-after-done
May 25, 2026
Merged

Add no-code-after-done rule to reject code after done()#451
lo1tuma merged 3 commits into
mainfrom
add-no-code-after-done

Conversation

@lo1tuma

@lo1tuma lo1tuma commented May 24, 2026

Copy link
Copy Markdown
Owner

Add a new mocha/no-code-after-done rule to report executable statements that run after a callback-style test or hook calls done().
Cover nested callback bodies and enable the rule in the recommended config.

@lo1tuma lo1tuma changed the title Add rule to reject code after done() Add no-code-after-done rule to reject code after done() May 24, 2026
@lo1tuma lo1tuma changed the title Add no-code-after-done rule to reject code after done() Add no-code-after-done rule to reject code after done() May 24, 2026
lo1tuma added 3 commits May 25, 2026 02:24
Report executable statements that run after a Mocha callback has already completed.
Cover nested callback bodies and enable the rule in the recommended config.
Track aliased and delegated callback completion across code paths.
Cover exact const alias cases and nested callback execution through public rule tests.
@lo1tuma
lo1tuma force-pushed the add-no-code-after-done branch from 0218cc1 to 6376f2b Compare May 25, 2026 01:32
@lo1tuma
lo1tuma merged commit 4447b3f into main May 25, 2026
5 checks passed
@lo1tuma
lo1tuma deleted the add-no-code-after-done branch May 25, 2026 01:52
lo1tuma added a commit that referenced this pull request Jul 17, 2026
Add `no-code-after-done` rule to reject code after done()
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