mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 12:21:58 +00:00
chore(linter): uncomment test case for no-func-assign rule (#1483)
This commit is contained in:
parent
abde1e06b0
commit
332ed81e1e
2 changed files with 8 additions and 2 deletions
|
|
@ -73,8 +73,7 @@ fn test() {
|
|||
("({x: foo = 0} = bar); function foo() { };", None),
|
||||
("function foo() { [foo] = bar; }", None),
|
||||
("(function() { ({x: foo = 0} = bar); function foo() { }; })();", None),
|
||||
// TODO
|
||||
// ("var a = function foo() { foo = 123; };", None),
|
||||
("var a = function foo() { foo = 123; };", None),
|
||||
];
|
||||
|
||||
Tester::new(NoFuncAssign::NAME, pass, fail).test_and_snapshot();
|
||||
|
|
|
|||
|
|
@ -51,4 +51,11 @@ expression: no_func_assign
|
|||
· ╰── foo is re-assigned here
|
||||
╰────
|
||||
|
||||
⚠ eslint(no-func-assign): 'foo' is a function.
|
||||
╭─[no_func_assign.tsx:1:1]
|
||||
1 │ var a = function foo() { foo = 123; };
|
||||
· ─┬─
|
||||
· ╰── foo is re-assigned here
|
||||
╰────
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue