mirror of
https://github.com/denoland/deno.git
synced 2025-02-18 19:33:00 -05:00
fix(unstable): add missing rule context types (#28014)
This commit is contained in:
parent
23540c2825
commit
a2afae46b6
1 changed files with 14 additions and 0 deletions
14
cli/tsc/dts/lib.deno.unstable.d.ts
vendored
14
cli/tsc/dts/lib.deno.unstable.d.ts
vendored
|
@ -1396,7 +1396,21 @@ declare namespace Deno {
|
||||||
* @experimental
|
* @experimental
|
||||||
*/
|
*/
|
||||||
export interface RuleContext {
|
export interface RuleContext {
|
||||||
|
/**
|
||||||
|
* The running rule id: `<plugin-name>/<rule-name>`
|
||||||
|
*/
|
||||||
id: string;
|
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;
|
report(data: ReportData): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue