Nucleus handler tools β€Ί Docs β€Ί Checks

A ! in the wrong place

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

Why it matters

!a in b means (!a) in b; you probably meant !(a in b).

Example

βœ— Wrong

var o = {};
if (!"a" in o) {
}

βœ“ Right

var o = {};
if (!("a" in o)) {
}

How to fix it

Put the brackets around the whole test: !(a in b).

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

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