Skip to content

Default export is untyped for ESM #1482

@reduckted

Description

@reduckted

Expected behavior

In an ESM project:

import jsdoc from 'eslint-plugin-jsdoc`;
// jsdoc is typed as ESLint.Plugin

Actual behavior

In an ESM project:

import jsdoc from 'eslint-plugin-jsdoc`;
// jsdoc is typed as any

I know the preferred way is to use the new exported jsdoc function, but I was using this plugin as this as part of a larger configuration and only need the plugin object. I can still get the plugin object, which is great 👍. It's just that now it doesn't have a type, so it results in a @typescript-eslint/no-unsafe-assignment warning when I try to assign it.

ESLint Config

N/A

ESLint sample

See code above.

Environment

  • Node version: 22.19.0
  • ESLint version 9.35.0
  • eslint-plugin-jsdoc version: 55.0.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions