Interface: ViolationReport
Defined in: _internal/jsonc-helpers.ts:58
A policy-compliant violation descriptor passed to reportViolation.
Remarksโ
Rules must not call context.report() directly; use
reportViolation(context, โฆ) instead so that the rule-reporting policy
contract test can verify all violations go through a shared helper.
Propertiesโ
data?โ
optional data?: Record<string, string>;
Defined in: _internal/jsonc-helpers.ts:64
Optional data to interpolate into the messageId template.
Exampleโ
`{ entry: "dist" }` when the message contains `"{{entry}}"`.
fix?โ
optional fix?: (fixer: RuleFixer) => RuleTextEdit | null;
Defined in: _internal/jsonc-helpers.ts:69
Optional autofix applied by ESLint when the user runs --fix.
Parametersโ
fixerโ
RuleFixer
Returnsโ
RuleTextEdit | null
locโ
loc: ReportLoc;
Defined in: _internal/jsonc-helpers.ts:72
Source location for the error underline.
messageIdโ
messageId: string;
Defined in: _internal/jsonc-helpers.ts:77
Key into the rule's meta.messages map.