Awesome Reviewers

Choose identifier names that are unambiguous, self-explanatory, and consistent with existing conventions already used elsewhere in the codebase or in the relevant external spec/ecosystem. Before introducing a new name, check how similar concepts are named in sibling modules (e.g. other middlewares, adapters, generics) and reuse that convention rather than inventing a new one.

Specifically:

Example:

// Bad: ambiguous option name, anonymous function, inconsistent with sibling middleware
export const myMiddleware = (options: { authorization?: string; strict?: boolean }) => {
  return async (c, next) => { ... }
}

// Good: name matches existing convention, named function, avoids ambiguity
export const myMiddleware = (options: { headerName?: string; alwaysRedirect?: boolean }) => {
  return async function myMiddleware(c, next) { ... }
}

Applying this standard reduces confusion during code review, prevents churn from repeated renames, and keeps the public API coherent across the whole library.