Skip to content

[Bug]: New type declarations not included in published package #3836

Closed
@JstnMcBrd

Description

@JstnMcBrd

Is there an existing issue for this?

  • I have searched the existing issues and my issue is unique
    My issue appears in the command-line and not only in the text editor

Description Overview

Source:


In the currently published version on npm (7.37.0), the new type declarations added in #3830 are missing. You can browse the published files here.

Expected Behavior

There should be a index.d.ts in the published package.

Also, package.json should have a "types" field.

"main": "index.js",
"types": "index.d.ts",

eslint-plugin-react version

v7.37.0

eslint version

NA

node version

NA

Activity

ljharb

ljharb commented on Oct 1, 2024

@ljharb
Member

@voxpelli in your original PR, you mentioned that the d.ts file will be preferred and the jsdoc comments ignored when present - does that impact adding the types field?

(i already have a fix locally for not npmignoring the d.ts files)

voxpelli

voxpelli commented on Oct 1, 2024

@voxpelli
Contributor

@ljharb the "types" field defaults to index.d.ts when not explicitly set as far as I remember, so it shouldn't actually be needed in this case, but it also shouldn't do much harm

ljharb

ljharb commented on Oct 1, 2024

@ljharb
Member

In that case it's just the npmignore thing for this issue (the failure of the type building in the publish workflow is separate)

added a commit that references this issue on Oct 1, 2024
63e0b49

26 remaining items

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @voxpelli@ljharb@JstnMcBrd

        Issue actions

          [Bug]: New type declarations not included in published package · Issue #3836 · jsx-eslint/eslint-plugin-react