frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: Catch hidden exceptions in JavaScript with ESLint and JSDoc

https://github.com/Xvezda/eslint-plugin-explicit-exceptions
2•Xvezda•6mo ago
I've built an ESLint plugin that enforces explicit exception documentation using JSDoc's @throws tag, similar to Java's `throws`.

It currently provides two rules: - `no-undocumented-throws`: flags functions that throw without a corresponding @throws tag - `no-implicit-propagation`: flags functions that call other @throws-documented functions without documenting the propagated exception

It includes auto-fixers, type-aware validation using TypeScript, and support for Promise rejections.

Would appreciate any feedback or suggestions.