-
Notifications
You must be signed in to change notification settings - Fork 66
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
Add TypeScript types #163
Comments
Hi! I’m curious, why do you ask this? |
Does this make sense, or am I making some silly mistake? |
Thanks! I was wondering, because I already updated the plugin for ESLint 9 in #155. (To be extra clear, the plugin already worked with ESLint 9 and flat config, that PR just added an extra The only thing I’m missing for “best in class flat config support” is types (see eslint/eslint#18093). I’ve only tested with plain JS, never TypeScript. I haven’t learned the best way to type an ESLint plugin yet. In the code you posted there are a couple of errors:
However, the type errors in the screenshot seem to indicate other errors. I can’t tell from the information you provided what’s going on. I would have expected errors about Either way, until I have added types to the package (or someone else has contributed them), you should be able to |
Yeah, so much for my ability to rapidly type in rough code Great to know that I can just ignore the errors. Thanks! |
I guess that as a quick and dirty solution you could do something like asserting that your exported rules are of type |
Version 12.1.0 has just been released with TypeScript types. |
Any chance of an upgrade with support for newer versions of ESLint?
The text was updated successfully, but these errors were encountered: