Skip to content

eslint rule for no async in describe blocks via eslint-plugin-mocha#6438

Open
gonzaotc wants to merge 5 commits intoOpenZeppelin:masterfrom
gonzaotc:feat/eslint-no-async-describe
Open

eslint rule for no async in describe blocks via eslint-plugin-mocha#6438
gonzaotc wants to merge 5 commits intoOpenZeppelin:masterfrom
gonzaotc:feat/eslint-no-async-describe

Conversation

@gonzaotc
Copy link
Copy Markdown
Contributor

@gonzaotc gonzaotc commented Mar 25, 2026

Fixes #4943

PR Checklist

  • Tests
  • Documentation
  • Changeset entry (run npx changeset add)

Andile Sizophila Mchunu and others added 4 commits March 21, 2026 23:05
@gonzaotc gonzaotc requested a review from a team as a code owner March 25, 2026 23:36
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Mar 25, 2026

⚠️ No Changeset found

Latest commit: 289dd79

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@socket-security
Copy link
Copy Markdown

socket-security Bot commented Mar 25, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​eslint-plugin-mocha@​11.2.010010010086100

View full report

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 25, 2026

Walkthrough

This pull request introduces the eslint-plugin-mocha ESLint plugin to enforce linting rules for Mocha test constructs. The plugin is added as a dev dependency, configured in the ESLint configuration with the mocha/no-async-suite rule set to error severity, and a changeset is created to document the patch-level release. Additionally, test files are updated to remove async keywords from Mocha describe blocks to comply with the newly enforced linting rule.

Suggested labels

tests

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The PR title clearly and specifically describes the main change: adding an ESLint rule to prevent async functions in Mocha describe blocks via eslint-plugin-mocha.
Linked Issues check ✅ Passed The PR fully implements the objective from issue #4943: adds eslint-plugin-mocha dependency, enables the no-async-describe rule in ESLint config, and removes async keywords from describe blocks.
Out of Scope Changes check ✅ Passed All changes are directly related to the linked issue objective: adding eslint-plugin-mocha, configuring the no-async-describe rule, and updating test files to comply with the new rule.
Description check ✅ Passed The PR description references the GitHub issue being fixed and includes a changeset entry, directly relating to the changeset additions in the PR.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Amxx Amxx requested a review from ernestognw April 20, 2026 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consider adding an ESLint rule for no async in describe blocks

2 participants