[]previous and next page

PluginDiagnostic

A finding of a plugin.

A finding of a plugin.

Import#

ts
import type { PluginDiagnostic } from "@shadow-js/compiler";

Signature#

ts
interface PluginDiagnostic {
  /** Stable identifier of the finding. Default `PLUGIN_DIAGNOSTIC`. */
  readonly code?: string;
  /** Explanation, without the position. */
  readonly message: string;
  /**
   * `"error"` stops the compilation once the plugin returns, `"warning"` and `"info"` are collected
   * in the result.
   * @default "warning"
   */
  readonly severity?: "error" | "warning" | "info";
  /** The place it applies to. Default: the start of the file. */
  readonly node?: PluginRange;
}

Members#

Name Type Description
code? readonly code?: string Stable identifier of the finding. Default PLUGIN_DIAGNOSTIC.
message readonly message: string Explanation, without the position.
severity? readonly severity?: "error" | "warning" | "info" "error" stops the compilation once the plugin returns, "warning" and "info" are collected in the result.
node? readonly node?: PluginRange The place it applies to. Default: the start of the file.