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

missing TypeScript declaration file #2324

Open
Zamiell opened this issue May 1, 2024 · 3 comments
Open

missing TypeScript declaration file #2324

Zamiell opened this issue May 1, 2024 · 3 comments

Comments

@Zamiell
Copy link
Contributor

Zamiell commented May 1, 2024

Now that ESLint 9 is released and everyone is migrating to flat config, importing the plugin into a flat config by following the official documentation actually results in a red squiggly line, because no declaration file exists (when using checkJs and/or @ts-check).

I suspect many/most users will be using TypeScript to validate that their new flat configs do not have typos in them. Thus, shipping a declaration file for this plugin would really be appreciated!

@TheElegantCoding
Copy link

same here
image

@fisker
Copy link
Collaborator

fisker commented May 8, 2024

Types already available https://github.com/eslint-types/define-config-plugin-types/tree/main/types/unicorn

Maybe @Shinigami92 can help us move to this repo?

@Shinigami92
Copy link

Types already available eslint-types/define-config-plugin-types@main/types/unicorn

Maybe @Shinigami92 can help us move to this repo?

I can try to help, but unfortunate I currently have much todo with maintaining node-pg-migrate, @faker-js/faker and private work, plus vacation & enjoying a bit of rest-freetime for my own ^^'
Right now I'm also not migrated to eslint v9 and all current tries are resulting in failures somehow, especially due to eslint-plugin-deprecation 😖

There is also a post by @nzakas that the eslint v8->v9 migration path will get a bit more stabilization in "near" future.

If someone wants to tackle a PR for unicorn, have a look into my script https://github.com/eslint-types/define-config-plugin-types/blob/main/scripts/generate-plugin-dts.ts and take everything needed to build up a starting base for unicorn types itself.
Then I assume they just need to be bundled into one index.d.ts and shipped via package.json "types" field.

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

No branches or pull requests

5 participants