Nucleus handler tools β€Ί Docs β€Ί Checks

Code that never runs

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

Why it matters

Nothing after return, throw, break or continue runs.

Example

βœ— Wrong

function f() {
  return 1;
  var x = 2;
}
f();

βœ“ Right

function f() {
  var x = 2;
  return x;
}
f();

How to fix it

Move the code before the return, or remove it.

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

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