Skip to content

Commit

Permalink
Fix expection in no-patronum-debug, fixes #127
Browse files Browse the repository at this point in the history
  • Loading branch information
igorkamyshev committed Oct 5, 2022
1 parent 0c76133 commit 5076883
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions rules/no-patronum-debug/examples/correct-issue-127.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
const Anchor = styled("a")({});
2 changes: 1 addition & 1 deletion rules/no-patronum-debug/no-patronum-debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module.exports = {
});
},
CallExpression(node) {
const currentMethod = node?.callee?.name ?? node?.callee?.object.name;
const currentMethod = node?.callee?.name ?? node?.callee?.object?.name;
const importedDebugFromPatronum = importedFromPatronum.get("debug");

if (
Expand Down
2 changes: 1 addition & 1 deletion rules/no-patronum-debug/no-patronum-debug.ts.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const readExampleForTheRule = (name) => ({
});

ruleTester.run("effector/no-patronum-debug", rule, {
valid: ["correct.ts"].map(readExampleForTheRule),
valid: ["correct.ts", "correct-issue-127.ts"].map(readExampleForTheRule),
invalid: [
...["incorrect-with-debug.ts"]
.map(readExampleForTheRule)
Expand Down

0 comments on commit 5076883

Please sign in to comment.