Skip to content
New issue

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

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

Already on GitHub? # to your account

missing TypeScript declaration file #214

Open
Zamiell opened this issue May 1, 2024 · 1 comment · May be fixed by #246
Open

missing TypeScript declaration file #214

Zamiell opened this issue May 1, 2024 · 1 comment · May be fixed by #246

Comments

@Zamiell
Copy link

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!

@jakec-dev
Copy link

Agreed on this, however in the meanwhile you can create a basic declaration file as below to avoid those red lines:

declare module '@eslint-community/eslint-plugin-eslint-comments/configs' {
  import type { Linter } from 'eslint';

  const recommended: Linter.Config;
  export = { recommended };
}

@aryaemami59 aryaemami59 linked a pull request Oct 26, 2024 that will close this issue
2 tasks
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants