Skip to content

Fix eslint-plugin-mocha config for v11 ESM export format#537

Merged
kategengler merged 3 commits into
dependabot/npm_and_yarn/eslint-plugin-mocha-11.2.0from
copilot/sub-pr-535
Nov 11, 2025
Merged

Fix eslint-plugin-mocha config for v11 ESM export format#537
kategengler merged 3 commits into
dependabot/npm_and_yarn/eslint-plugin-mocha-11.2.0from
copilot/sub-pr-535

Conversation

Copilot AI commented Nov 11, 2025

Copy link
Copy Markdown

eslint-plugin-mocha v11 changed from CommonJS to ES module exports. The existing require() statement failed because the plugin is now exported under .default.

Changes

  • Updated eslint.config.js to handle ESM/CJS interop by accessing .default property:
const mochaPlugin = require('eslint-plugin-mocha');
const mocha = mochaPlugin.default || mochaPlugin;

This maintains backward compatibility while properly accessing the plugin in v11.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits November 11, 2025 17:18
Co-authored-by: kategengler <444218+kategengler@users.noreply.github.com>
Co-authored-by: kategengler <444218+kategengler@users.noreply.github.com>
Copilot AI changed the title [WIP] Update eslint-plugin-mocha from 10.5.0 to 11.2.0 Fix eslint-plugin-mocha config for v11 ESM export format Nov 11, 2025
Copilot AI requested a review from kategengler November 11, 2025 17:21
@kategengler kategengler marked this pull request as ready for review November 11, 2025 21:17
@kategengler kategengler added the dependencies Pull requests that update a dependency file label Nov 11, 2025
@kategengler kategengler merged commit 3ae670e into dependabot/npm_and_yarn/eslint-plugin-mocha-11.2.0 Nov 11, 2025
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants