Skip to content

Latest commit

 

History

History
37 lines (27 loc) · 627 Bytes

no-ignored-error.md

File metadata and controls

37 lines (27 loc) · 627 Bytes

Enforce the passing of error handlers (no-ignored-error)

This rule enforces the passing of an error handler to subscribe calls.

Rule details

Examples of incorrect code for this rule:

source.subscribe((value) => console.log(value));
source.subscribe({
  next: (value) => console.log(value)
});

Examples of correct code for this rule:

source.subscribe(
  (value) => console.log(value),
  (error) => console.error(error)
);
source.subscribe({
  next: (value) => console.log(value),
  error: (error) => console.error(error)
});

Options

This rule has no options.