microsoft / tsdoc

A doc comment standard for TypeScript
https://tsdoc.org/
MIT License
4.68k stars 131 forks source link

Validate invalid params through tsdoc eslint plugin #353

Open tvvignesh opened 1 year ago

tvvignesh commented 1 year ago

Hi. I installed the tsdoc plugin and while it works well, its unable to detect invalid params like the one you see below. Kindly let me know how to validate such param. Thanks

image

As you see 2 params doesn't exist but the linter doesn't pick it up

nbouvrette commented 10 months ago

If this can be useful to anyone.. I thought I could create a quick ESLint rule to fix this and got down the rabbit hole: https://gist.github.com/nbouvrette/f2c90316533e5a6c1f7702e35e4a586a

There are a lot of details to check but I think this covers most of the @param validity.

You can use it locally with the correct setup (more info here: https://github.com/typescript-eslint/typescript-eslint/issues/7284#issuecomment-1679071389)