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] type declaration for eslint flat config #371

Open
TheElegantCoding opened this issue Oct 26, 2024 · 3 comments
Open

[BUG] type declaration for eslint flat config #371

TheElegantCoding opened this issue Oct 26, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@TheElegantCoding
Copy link

Describe the bug
The package don't have a type declaration file of the options and exports members

To Reproduce
Add the configuration like bellow and add in tsconfig.json "noImplicitAny": true

import tailwind from 'eslint-plugin-tailwindcss';

import type { Linter } from 'eslint';

const Tailwind: Linter.Config =
{
  languageOptions:
  {
    parserOptions:
    {
      ecmaFeatures:
      {
        jsx: true
      }
    }
  },
  name: 'tailwind',
  plugins: tailwind,
  rules:
  {

  }
};

export { Tailwind };

Expected behavior
This package should support typescript

Screenshots
image

Environment (please complete the following information):

  • OS: windows 10
  • Softwares + version used:
    • VSCode 1.94.2
@TheElegantCoding TheElegantCoding added the bug Something isn't working label Oct 26, 2024
@TheElegantCoding TheElegantCoding changed the title [BUG] [BUG] type declaration for eslint flat config Oct 26, 2024
@kachkaev
Copy link
Contributor

There exists @types/eslint-plugin-tailwindcss which you can install in the meantime.

@TheElegantCoding
Copy link
Author

This work perfect, didnt know that [@types/eslint-plugin-tailwindcss](https://www.npmjs.com/package/@types/eslint-plugin-tailwindcss) exists, thanks!

@kachkaev
Copy link
Contributor

kachkaev commented Oct 28, 2024

The issue you have created is valid, let’s keep it open for now. While @types/eslint-plugin-tailwindcss package does the job, it’d be more convenient to use types directly from eslint-plugin-tailwindcss. One less dependency to install and update!

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

No branches or pull requests

2 participants