Skip to content

Commit 5076883

Browse files
committed
Fix expection in no-patronum-debug, fixes #127
1 parent 0c76133 commit 5076883

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
const Anchor = styled("a")({});

rules/no-patronum-debug/no-patronum-debug.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ module.exports = {
3131
});
3232
},
3333
CallExpression(node) {
34-
const currentMethod = node?.callee?.name ?? node?.callee?.object.name;
34+
const currentMethod = node?.callee?.name ?? node?.callee?.object?.name;
3535
const importedDebugFromPatronum = importedFromPatronum.get("debug");
3636

3737
if (

rules/no-patronum-debug/no-patronum-debug.ts.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const readExampleForTheRule = (name) => ({
2121
});
2222

2323
ruleTester.run("effector/no-patronum-debug", rule, {
24-
valid: ["correct.ts"].map(readExampleForTheRule),
24+
valid: ["correct.ts", "correct-issue-127.ts"].map(readExampleForTheRule),
2525
invalid: [
2626
...["incorrect-with-debug.ts"]
2727
.map(readExampleForTheRule)

0 commit comments

Comments
 (0)