0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-02-22 13:13:32 -05:00
denoland-deno/tests/specs/lint/lint_plugin_lifecycle/plugin.ts
Marvin Hagemeister 9213215d6d
feat(unstable): add test for lint plugin destroy hook (#27981)
Noticed that we didn't test the `destroy()` hook of lint plugins. This
PR adds a test for that.
2025-02-06 14:04:04 +01:00

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}`);
},
},
},
};