Skip to content

Commit

Permalink
fix(unstable): add missing rule context types (#28014)
Browse files Browse the repository at this point in the history
  • Loading branch information
marvinhagemeister authored Feb 11, 2025
1 parent 23540c2 commit a2afae4
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions cli/tsc/dts/lib.deno.unstable.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1396,7 +1396,21 @@ declare namespace Deno {
* @experimental
*/
export interface RuleContext {
/**
* The running rule id: `<plugin-name>/<rule-name>`
*/
id: string;
/**
* Name of the file that's currently being linted.
*/
fileName: string;
/**
* Retrieve the source code of the current file.
*/
source(): string;
/**
* Report a lint error.
*/
report(data: ReportData): void;
}

Expand Down

0 comments on commit a2afae4

Please sign in to comment.