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

JSDoc @deprecated diagnostics #623

Open
kitsonk opened this issue Feb 23, 2021 · 6 comments
Open

JSDoc @deprecated diagnostics #623

kitsonk opened this issue Feb 23, 2021 · 6 comments
Labels
feature a new feature

Comments

@kitsonk
Copy link
Contributor

kitsonk commented Feb 23, 2021

deno_lint should be able to parse the JSDoc for symbols and identify ones that have the @deprecated flag and issue a diagnostic if the @deprecated APIs are being used.

@kitsonk kitsonk added the feature a new feature label Feb 23, 2021
@lucacasonato
Copy link
Member

This is not possible without type information.

@kitsonk
Copy link
Contributor Author

kitsonk commented Feb 23, 2021

How so? swc bundling tracks symbols across modules without type information, so the swc parser is aware of what symbols are used where and what JSDoc is associated with them.

@lucacasonato
Copy link
Member

The linter operates on single files though, not on an entire graph. We don't have info about any symbols outside of the file being linted.

@kitsonk
Copy link
Contributor Author

kitsonk commented Feb 23, 2021

At the moment, and that is different than requiring type information.

@petamoriken
Copy link
Contributor

FYI: denoland/deno#7982 (comment)

Annex B will be annotated as @deprecated in TypeScript 4.5 and later, it will may be possible to prevent it from being used.
microsoft/TypeScript#43709

@iuioiua
Copy link
Contributor

iuioiua commented Apr 15, 2024

This would be an amazing addition to the linter. Is this now possible?

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

No branches or pull requests

4 participants