chore(linter): uncomment test case for no-func-assign rule (#1483)

This commit is contained in:
Shannon Rothe 2023-11-21 21:22:09 +11:00 committed by GitHub
parent abde1e06b0
commit 332ed81e1e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View file

@ -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();

View file

@ -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
╰────