mirror of
https://github.com/denoland/deno.git
synced 2025-02-23 13:43:31 -05:00
21 lines
446 B
TypeScript
21 lines
446 B
TypeScript
![]() |
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, Date.now().toString());
|
||
|
},
|
||
|
});
|
||
|
},
|
||
|
};
|
||
|
},
|
||
|
},
|
||
|
},
|
||
|
};
|