Skip to content

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

Open
gonzaotc wants to merge 4 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 4 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

🦋 Changeset detected

Latest commit: 90cb6c3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
openzeppelin-solidity Patch

Not sure what this means? Click here to learn what changesets are.

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

@socket-security
Copy link
Copy Markdown

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consider adding an ESLint rule for no async in describe blocks

1 participant