PineLint class is responsible for linting Pine Script code.

Constructors

Properties

diagnosticCollection: DiagnosticCollection

Holds the diagnostic collection for the PineLint class

diagnostics: any[] = []

Holds the diagnostics for the PineLint class

fileName: null | string = null

Holds the filename of the PineLint class

initialFlag: boolean = true

A flag used for controlling the initial linting in the PineLint class

lint: DebouncedFunc<(() => Promise<void>)> = ...

Debounced version of the lintDocument method.

Type declaration

    • (): Promise<void>
    • Returns Promise<void>

version: null | string = null

Holds the version of the PineLint class

Accessors

  • get DiagnosticCollection(): DiagnosticCollection
  • Getter for DiagnosticCollection. If it doesn't exist, it initializes it.

    Returns DiagnosticCollection

Methods

  • Checks the version of PineLint.

    Returns Promise<boolean>

    A promise that resolves to a boolean indicating whether the version is 5.

  • Formats the incoming PineRequest.

    Parameters

    • incomming: PineRequest

      The incoming PineRequest to be formatted.

    Returns Promise<void>

  • Gets the diagnostics if they exist.

    Returns undefined | any[]

  • Getter for fileName.

    Returns Promise<null | string>

  • Handles changes to the active document.

    Returns Promise<void>

  • Handles the response from the linting process.

    Parameters

    • response: any

      The response from the linting process.

    Returns Promise<void>

  • Performs initial linting if the initialFlag is true.

    Returns Promise<void>

  • Lints the active document if it exists and the version is correct.

    Returns Promise<void>

  • Sets the diagnostics for a given URI.

    Parameters

    • uri: Uri

      The URI to set the diagnostics for.

    • diagnostics: any[]

      The diagnostics to set.

    Returns void

  • Setter for fileName.

    Parameters

    • fileName: string

    Returns Promise<void>

  • Updates the diagnostics for the active document.

    Parameters

    • Rest ...dataGroups: any[][]

      The groups of data to update the diagnostics with.

    Returns Promise<void>

  • Clears the script version for PineLint.

    Returns void

Generated using TypeDoc