Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
2 tasks done
JstnMcBrd opened this issue Oct 1, 2024 · 3 comments
Closed
2 tasks done

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

JstnMcBrd opened this issue Oct 1, 2024 · 3 comments
Labels

Comments

@JstnMcBrd
Copy link

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

@ljharb
Copy link
Member

ljharb commented Oct 1, 2024

@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
Copy link
Contributor

voxpelli commented Oct 1, 2024

@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
Copy link
Member

ljharb commented Oct 1, 2024

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

@ljharb ljharb closed this as completed in 63e0b49 Oct 1, 2024
renovate bot added a commit to mmkal/eslint-plugin-mmkal that referenced this issue Oct 1, 2024
renovate bot added a commit to mmkal/eslint-plugin-mmkal that referenced this issue Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants