Skip to content

eslint/no-func-assign Correctness

This rule is turned on by default.

What it does

Disallow reassigning function declarations

Why is this bad?

Overwriting/reassigning a function written as a FunctionDeclaration is often indicative of a mistake or issue.

Example

javascript
function foo() {}
foo = bar;

References

Released under the MIT License.