Nucleus handler tools β€Ί Docs β€Ί Checks

A loop that counts the wrong way

Warningfor-directionA general JavaScript mistake (ESLint's for-direction) Β· Probably wrong: Nucleus runs it, but not the way you meant.

Why it matters

The counter moves away from the end condition, so the loop never stops (or never runs).

Example

βœ— Wrong

for (var i = 0; i < 4; i--) {
}

βœ“ Right

for (var i = 0; i < 4; i++) {
}

How to fix it

Count towards the end condition (i++ with <).

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

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