File tree 3 files changed +9
-27
lines changed
3 files changed +9
-27
lines changed Original file line number Diff line number Diff line change @@ -1423,8 +1423,12 @@ declare namespace Deno {
1423
1423
* export default {
1424
1424
* name: "my-plugin",
1425
1425
* rules: {
1426
- * TODO:...
1427
- * }
1426
+ * "no-foo": {
1427
+ * create(ctx) {
1428
+ * // ...
1429
+ * }
1430
+ * }
1431
+ * }
1428
1432
* } satisfies Deno.lint.Plugin
1429
1433
* ```
1430
1434
* @category Linter
Original file line number Diff line number Diff line change 3
3
import { assertEquals } from "./test_util.ts" ;
4
4
import { assertSnapshot } from "@std/testing/snapshot" ;
5
5
6
- // TODO(@marvinhagemeister) Remove once we land "official" types
7
- export interface LintReportData {
8
- // deno-lint-ignore no-explicit-any
9
- node : any ;
10
- message : string ;
11
- }
12
- // TODO(@marvinhagemeister) Remove once we land "official" types
13
- interface LintContext {
14
- id : string ;
15
- }
16
6
// TODO(@marvinhagemeister) Remove once we land "official" types
17
7
// deno-lint-ignore no-explicit-any
18
8
type LintVisitor = Record < string , ( node : any ) => void > ;
19
9
20
- // TODO(@marvinhagemeister) Remove once we land "official" types
21
- interface LintRule {
22
- create ( ctx : LintContext ) : LintVisitor ;
23
- destroy ?( ) : void ;
24
- }
25
-
26
- // TODO(@marvinhagemeister) Remove once we land "official" types
27
- interface LintPlugin {
28
- name : string ;
29
- rules : Record < string , LintRule > ;
30
- }
31
-
32
10
function testPlugin (
33
11
source : string ,
34
- rule : LintRule ,
35
- ) : Deno . lint . LintDiagnostic [ ] {
12
+ rule : Deno . lint . Rule ,
13
+ ) : Deno . lint . Diagnostic [ ] {
36
14
const plugin = {
37
15
name : "test-plugin" ,
38
16
rules : {
Original file line number Diff line number Diff line change 1
1
// Copyright 2018-2025 the Deno authors. MIT license.
2
2
3
- const EXPECTED_OP_COUNT = 13 ;
3
+ const EXPECTED_OP_COUNT = 16 ;
4
4
5
5
Deno . test ( function checkExposedOps ( ) {
6
6
// @ts -ignore TS doesn't allow to index with symbol
You can’t perform that action at this time.
0 commit comments