Skip to content

docs(ip-restriction): add clear JSDoc examples and param types#4851

Merged
yusukebe merged 1 commit intohonojs:mainfrom
VISHNU7KASIREDDY:docs/ip-restriction-jsdoc
Apr 1, 2026
Merged

docs(ip-restriction): add clear JSDoc examples and param types#4851
yusukebe merged 1 commit intohonojs:mainfrom
VISHNU7KASIREDDY:docs/ip-restriction-jsdoc

Conversation

@VISHNU7KASIREDDY
Copy link
Copy Markdown
Contributor

This PR adds a comprehensive @example block and fully documents the @param and @returns tags for the ipRestriction middleware. This will help developers understand how to correctly configure its allowList/denyList and custom onError handler right from their IDE.

  • Adds exhaustive @param documentation
  • Adds @example showcasing complex CIDR/IP combinations and a custom error handler
  • Adds @see linking directly to the Hono ip-restriction docs

Addresses the current lack of IDE context for this specific middleware.

Adds a comprehensive @example block and fully documents the @param and @returns tags for the  middleware to help developers understand its capabilities regarding allowList/denyList out of the box.
@VISHNU7KASIREDDY
Copy link
Copy Markdown
Contributor Author

Hi @yusukebe, could you please review and merge this when you have time? Thank you.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.85%. Comparing base (e1ae0eb) to head (036a316).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4851   +/-   ##
=======================================
  Coverage   92.84%   92.85%           
=======================================
  Files         177      177           
  Lines       11643    11657   +14     
  Branches     3469     3475    +6     
=======================================
+ Hits        10810    10824   +14     
  Misses        832      832           
  Partials        1        1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Member

@yusukebe yusukebe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@yusukebe
Copy link
Copy Markdown
Member

yusukebe commented Apr 1, 2026

@VISHNU7KASIREDDY Thanks!

@yusukebe yusukebe merged commit a8c56a6 into honojs:main Apr 1, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants