0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-03-06 02:52:05 -05:00
deno/tests/specs/lint/lint_plugin/plugin.ts
2025-01-02 16:28:13 +01:00

22 lines
454 B
TypeScript

export default {
name: "test-plugin",
rules: {
"my-rule": {
create(context) {
return {
Identifier(node) {
if (node.name === "_a") {
context.report({
node,
message: "should be _b",
fix(fixer) {
return fixer.replaceText(node, "_b");
},
});
}
},
};
},
},
},
};