Skip to content

Conversation

@rhysd
Copy link
Contributor

@rhysd rhysd commented May 31, 2025

Fix #392

By this change plugin.d.ts looks like the following. configs field is no longer optional.

import type { ESLint, Linter } from 'eslint';
export type MochaPlugin = ESLint.Plugin & {
    configs: {
        all: Linter.Config;
        recommended: Linter.Config;
    };
};
declare const mochaPlugin: MochaPlugin;
export default mochaPlugin;
//# sourceMappingURL=plugin.d.ts.map

}
},
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-explicit-any,@typescript-eslint/no-unsafe-type-assertion -- This field will be set later for cyclic references
configs: undefined as any
Copy link
Contributor Author

@rhysd rhysd May 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This hack is ugly but I could not find any other workaround for those cyclic references.

@mdmower-csnw
Copy link
Contributor

@rhysd - Should be able to close this pull request since #400 was accepted.

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.

configs field is wrongly optional in the type definition

2 participants