0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-02-23 21:53:26 -05:00
denoland-deno/tests/specs/lint/lint_plugin_fix_error/plugin.ts

21 lines
444 B
TypeScript
Raw Normal View History

export default {
name: "test-plugin",
rules: {
"my-rule": {
create(context) {
return {
VariableDeclarator(node) {
context.report({
node: node.init,
message: 'should be equal to string "1"',
fix(fixer) {
return fixer.replaceText(node.init, "garbage test test");
},
});
},
};
},
},
},
};