Nucleus handler tools β€Ί Docs β€Ί Checks

An assignment where a comparison was meant?

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

Why it matters

A single = inside a condition assigns: the condition is the assigned value. To compare, write == (or ===).

Example

βœ— Wrong

var a = 1;
if (a = 2) {
}

βœ“ Right

var a = 1;
if (a == 2) {
}

How to fix it

Use == (or ===) to compare.

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-cond-assign": "off" } in your settings. Notepad++: Plugins β€Ί Nucleus Co-op handlers β€Ί Settings. Command line: ncdev lint --rule no-cond-assign=off. Other editors: the lint.rules setting of ncdev lsp.

Is this right?
Stuck, or not sure? Ask other handler authors: Discordr/nucleuscoop