Skip to content

Conversation

@mdmower-csnw
Copy link
Contributor

  • Define the mocha plugin with a meaningful shape, including supported config keys. Use satisfies operator to ensure the final plugin adheres to type ESLint.Plugin. This will fix type errors when users attempt to use mochaPlugin.configs.recommended (and .all) in type checked eslint configs.
  • Update test since rules is no longer possibly undefined.

Fixes #392

- Define the mocha plugin with a meaningful shape, including supported
  config keys. Use satisfies operator to ensure the final plugin adheres
  to type `ESLint.Plugin`. This will fix type errors when users attempt
  to use `mochaPlugin.configs.recommended` (and `.all`) in type checked
  eslint configs.
- Update test since `rules` is no longer possibly undefined.
@mdmower-csnw
Copy link
Contributor Author

mdmower-csnw commented Sep 26, 2025

@lo1tuma - Would you be willing to review?

Apply satisfies operator during assignment, not export.
@mdmower-csnw
Copy link
Contributor Author

Or maybe @screendriver could review?

@screendriver screendriver merged commit ac449cc into lo1tuma:main Oct 1, 2025
5 checks passed
@MikeMcC399
Copy link
Contributor

@screendriver (or @lo1tuma)

Please add the 11.2.0 release to https://github.com/lo1tuma/eslint-plugin-mocha/releases to keep the update history consistent. Thanks!

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.

configs field is wrongly optional in the type definition

4 participants