0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-02-19 03:43:00 -05:00

fix(unstable): add missing rule context types (#28014)

This commit is contained in:
Marvin Hagemeister 2025-02-11 16:35:16 +01:00 committed by GitHub
parent 23540c2825
commit a2afae46b6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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;
}