-
-
Notifications
You must be signed in to change notification settings - Fork 159
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/eslint-plugin-jsdoc or bundle .d.ts #1130
Comments
#1139 added eslint-plugin-jsdoc/package.json Line 86 in e8b1475
but index.d.ts is missing from the distributed package |
That's because Looks like |
Yes, sorry, I inadvertently actually added that when merely considering adding it. I'm afraid that with some projects rather conscious about package size, that the multiple generated files may become cumbersome for some. We could submit this to DefinitelyTyped, as you say, using what we're already able to generate. |
I don't understand why package size matters for a dev dependency - unless it's ridiculously large 😃 How big are the types? For comparison Anyway, types bundled in the package is optimal but publishing a separate types package or via DefinitelyTyped also works 📦 |
For our project, it's 76 KB / 49 KB (with and without map files). I am also unclear on why it should matter (IDEs which rely on linting tools perhaps?), but it really apparently does given how much attention projects have given us to package size (#1141 being only the most recent). I'm not keen to garner complaints on this (especially when typing is not really so critical for ESLint config files, beyond suppressing complaints in IDEs) and then having to yank the new typing feature from those who do want it. While there are some who consider it an anti-pattern to publish within the package due to semver noise, I personally prefer it myself (projects ideally shouldn't need to track transitive dependencies themselves), but feel it is unfortunately necessary at this point. |
BREAKING CHANGE: Adds types
I've submitted #1180 which should do the trick. It appears that it will be sufficient and feasible to only publish the index file types. |
Thank you so much! |
🎉 This issue has been resolved in version 47.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
If someone wouldn't mind letting us how it goes... |
Should be fixed now in #1181 (and released in v47.0.1). |
Another error 🥲 Why is an empty object needed here? |
Will users really need to get at |
I modified it to the version recommended in the README (https://www.npmjs.com/package/eslint-plugin-jsdoc), and now it works 🎉 But honestly, I'm not very fond of how it looks now 😁 My other plugins look like this... but so far, ESLint itself doesn't know how to better incorporate them 😅 |
The problem with the latter is that the plugins themselves need to be reworked for flat config. A bit of a mess... |
As of now, I think everything is great, thank you for all you do! |
Just tried to use it but it seems we've incorrectly used
|
I'm also experiencing a "double- |
Ah yes, you're right. Fix should be applied shortly.
Can you indicate where you're seeing the error when you don't change the |
🎉 This issue has been resolved in version 47.0.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This builds without issue: const jsdocConfig: Linter.FlatConfig = jsdoc.default.configs[
"flat/recommended-typescript-flavor-error"
]; But fails at runtime:
If you need help reproducing, the following files are all it seems to need for the error to occur.
|
It appears it can be fixed by our switching to native ESM (with fallback to CJS) (or by using babel's plugin for add-module-exports, but I think we'll go with the former). |
Hey @brettz9, all Now it looks perfect! Thank you for all you do! Here is my migration PR - what1s1ove/whatislove.dev#298 and here is my |
Try release v48.0.1 |
Sorry for the silence, just got around to checking and everything now seems to be working as expected. Thank you so much for all your work. |
Motivation
With the new ESLint flat config we import plugins
However that causes typescript in the VSCode to report an error due to missing type definitions.
Current behavior
There are no types for eslint-plugin-jsdoc
Desired behavior
eslint-plugin-jsdoc
should bundle the typescript types.I'm not sure this is correct, but here's an example of the d.ts
Alternatives considered
A DefinitelyTyped package
@types/eslint-plugin-jsdoc
The text was updated successfully, but these errors were encountered: