Nucleus handler tools › Docs › Checks

A function overwritten

Warningno-func-assignA general JavaScript mistake (ESLint's no-func-assign) · Probably wrong: Nucleus runs it, but not the way you meant.

Why it matters

This overwrites a function declared with the same name.

Example

✗ Wrong

function f() {
}
f = 1;

✓ Right

function f() {
}
var g = 1;

How to fix it

Use another name for the value.

Turn it off, or change how it shows

Each check can be shown as an error, warning, info or hint, or turned off. VS Code: "splitscreenme.lint.rules": { "no-func-assign": "off" } in your settings. Notepad++: Plugins › Nucleus Co-op handlers › Settings. Command line: ncdev lint --rule no-func-assign=off. Other editors: the lint.rules setting of ncdev lsp.

Is this right? Tell us what's wrong
Stuck, or not sure? Ask other handler authors: Discordr/nucleuscoop