Skip to content

require-rejects errors on non-async function #1603

@Zamiell

Description

@Zamiell

The following function causes the "require-rejects" rule to report an error:

/** @param bar Something. */
export function foo(bar: string): void {
  throw new Error(`some error: ${bar}`);
}

I expect this function not to error, because it is not an async function and it does not have anything to do with promises.

Environment

  • Node version: v24.11.1
  • ESLint version v9.39.1
  • eslint-plugin-jsdoc version: 61.4.0

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions