Skip to content

Rename no-top-level-hooks to no-root-hooks - #433

Merged
lo1tuma merged 1 commit into
mainfrom
rename-root-hooks-rule
May 23, 2026
Merged

Rename no-top-level-hooks to no-root-hooks#433
lo1tuma merged 1 commit into
mainfrom
rename-root-hooks-rule

Conversation

@lo1tuma

@lo1tuma lo1tuma commented May 23, 2026

Copy link
Copy Markdown
Owner

Mocha calls hooks declared outside a suite root hooks.

This renames mocha/no-top-level-hooks to mocha/no-root-hooks and updates the docs to link to the Mocha Root-Level Hooks documentation.

Users should replace mocha/no-top-level-hooks with mocha/no-root-hooks in their ESLint config.

@lo1tuma lo1tuma changed the title Breaking: Rename no-top-level-hooks to no-root-hooks Rename no-top-level-hooks to no-root-hooks May 23, 2026
Mocha calls hooks declared outside a suite root hooks. Rename the rule so the public rule id and documentation use Mocha's terminology.

BREAKING CHANGE: Users must replace mocha/no-top-level-hooks with mocha/no-root-hooks in ESLint configs.
@lo1tuma
lo1tuma force-pushed the rename-root-hooks-rule branch from 1aa0930 to 1e4af02 Compare May 23, 2026 09:47
@lo1tuma
lo1tuma merged commit b07859d into main May 23, 2026
5 checks passed
@lo1tuma
lo1tuma deleted the rename-root-hooks-rule branch May 23, 2026 11:31
lo1tuma added a commit that referenced this pull request Jul 17, 2026
Rename no-top-level-hooks to no-root-hooks
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