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

Types don't exist in bundled package #128

Closed
1 task done
JoshuaKGoldberg opened this issue Mar 4, 2024 · 4 comments · Fixed by #129
Closed
1 task done

Types don't exist in bundled package #128

JoshuaKGoldberg opened this issue Mar 4, 2024 · 4 comments · Fixed by #129
Assignees
Labels
bug Something isn't working

Comments

@JoshuaKGoldberg
Copy link

Describe the bug

I'm trying to use eslint-plugin-solid in an eslint.config.js with TypeScript's checkJs: true. eslint-plugin-solid's package.json claims dist/index.d.ts should exist:

"types": "dist/index.d.ts",

...but that file doesn't exist in the published package.

https://arethetypeswrong.github.io/?p=eslint-plugin-solid%400.13.1:

No types

Import resolved to JavaScript files, but no type declarations were found.

To Reproduce

https://www.typescriptlang.org/play?#code/JYWwDg9gTgLgBAZwgG2AEzgMyhEcBEApgqgHYwC0YyArgObCkVKpr4DcAUJ4QB6Sw4aQpgCGNZPADaLdAF12QA

Expected behavior

Types should be included with the package.

Environment (please complete the following information):

  • OS: [e.g. Mac OS 11, Windows 10] n/a
  • Node version (node --version): n/a
  • eslint-plugin-solid version (npm list eslint-plugin-solid/yarn why eslint-plugin-solid): 0.13.1
  • eslint version (npm list eslint/yarn why eslint): n/a

Additional context

  • I would be willing to contribute a PR to fix this issue
@nix6839
Copy link
Contributor

nix6839 commented Mar 10, 2024

It seems like you are looking to use flat config, but the eslint-plugin-solid does not export flat config from the root of the module. Please refer to this link: https://github.com/solidjs-community/eslint-plugin-solid#flat-configuration

However, not exporting the type is actually a bug, so I will submit a PR for that.

Additionally, since other plugins supporting flat config export it from the root of the module, I will also submit a separate PR to export flat config from the root of the module for consistency.

nix6839 added a commit to nix6839/eslint-plugin-solid that referenced this issue Mar 10, 2024
@joshwilsonvu
Copy link
Collaborator

Thank you both—as you can probably expect, shipping types hasn't really been a priority until now, but it makes sense for use with flat config. I'll take a look at that PR

@pauliesnug
Copy link
Contributor

I am also experiencing this issue, could this be merged? Thank you

@nix6839
Copy link
Contributor

nix6839 commented Apr 4, 2024

Additionally, since other plugins supporting flat config export it from the root of the module, I will also submit a separate PR to export flat config from the root of the module for consistency.

I have opened a PR: #135. Reviews are welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants