Skip to main content

Function: reportWithFixCompatibility()

function reportWithFixCompatibility(
problem: FixableProblem,
context: RuleContext
): void;

Defined in: _internal/report-with-fix-compatibility.ts:18

Report an autofixable problem across the complete supported Stylelint range.

Stylelint 16.0 predates the report({ fix }) callback. Its rule context has an own data property named fix, whereas current Stylelint exposes a getter that emits a deprecation warning when read. Inspecting the descriptor lets us use the legacy mutation path only when necessary, without touching the deprecated getter on current runtimes.

Parametersโ€‹

problemโ€‹

FixableProblem

contextโ€‹

RuleContext

Returnsโ€‹

void