Message.

Hierarchy (view full)

Constructors

Properties

actual: undefined | string

Specify the source value that’s being reported, which is deemed incorrect.

Stack of ancestor nodes surrounding the message.

column: undefined | number

Starting column of message.

expected: undefined | string[]

Suggest acceptable values that can be used instead of actual.

fatal: undefined | null | boolean

State of problem.

  • true β€” error, file not usable
  • false β€” warning, change may be needed
  • undefined β€” change likely not needed
file: undefined | string

Path of a file (used throughout the VFile ecosystem).

line: undefined | number

Starting line of error.

message: string
name: string
note: undefined | string

Long form description of the message (you should use markdown).

Place of message.

reason: string

Reason for message, should use markdown.

ruleId: undefined | string

Category of message (example: 'my-rule').

source: undefined | string

Namespace of message (example: 'my-package').

stack?: string
url: undefined | string

Link to docs for the message.

πŸ‘‰ Note: this must be an absolute URL that can be passed as x to new URL(x).

prepareStackTrace?: ((err, stackTraces) => any)

Optional override for formatting stack traces

Type declaration

    • (err, stackTraces): any
    • Parameters

      Returns any

stackTraceLimit: number

Methods

  • Create .stack property on a target object

    Parameters

    • targetObject: object
    • Optional constructorOpt: Function

    Returns void