mirror of
https://github.com/denoland/deno.git
synced 2025-02-22 13:13:32 -05:00

Noticed that we didn't test the `destroy()` hook of lint plugins. This PR adds a test for that.
23 lines
435 B
TypeScript
23 lines
435 B
TypeScript
export default {
|
|
name: "test-plugin",
|
|
rules: {
|
|
"my-rule": {
|
|
create(ctx) {
|
|
console.log(`create: ${ctx.id}`);
|
|
return {};
|
|
},
|
|
destroy(ctx) {
|
|
console.log(`destroy: ${ctx.id}`);
|
|
},
|
|
},
|
|
"my-rule-2": {
|
|
create(ctx) {
|
|
console.log(`create: ${ctx.id}`);
|
|
return {};
|
|
},
|
|
destroy(ctx) {
|
|
console.log(`destroy: ${ctx.id}`);
|
|
},
|
|
},
|
|
},
|
|
};
|