Skip to content

Rulvar API reference


Rulvar API reference / @rulvar/planner / lintScript

Function: lintScript()

ts
function lintScript(source): {
  diagnostics: PlanDiagnostic[];
  errors: PlanDiagnostic[];
  workflow?: CompiledWorkflow;
};

Defined in: packages/planner/src/plan.ts:106

Lints a script BODY with the workflows preset plus compileScript. The body is wrapped in an async function for parsing (top-level return/await are legal in the dialect); reported lines shift back so they index into the body source.

Parameters

ParameterType
sourcestring

Returns

ts
{
  diagnostics: PlanDiagnostic[];
  errors: PlanDiagnostic[];
  workflow?: CompiledWorkflow;
}
NameTypeDefined in
diagnosticsPlanDiagnostic[]packages/planner/src/plan.ts:107
errorsPlanDiagnostic[]packages/planner/src/plan.ts:108
workflow?CompiledWorkflowpackages/planner/src/plan.ts:109