Function: reportViolation()
function reportViolation(
context: Readonly<Rule.RuleContext>,
violation: Readonly<ViolationReport>
): void;
Defined in: _internal/jsonc-helpers.ts:357
Report a rule violation through the shared policy-compliant helper.
Parametersโ
contextโ
Readonly<Rule.RuleContext>
The ESLint rule context provided by createJsoncRule.
violationโ
Violation descriptor (location, messageId, optional fix).
Returnsโ
void
Remarksโ
This wrapper exists so that the rule-reporting policy contract test can
confirm every rule uses a shared channel instead of calling
context.report() directly. The cast to unknown is required because the