Nucleus handler tools › Docs › Checks

Math or JSON called as a function

Errorno-obj-callsA general JavaScript mistake (ESLint's no-obj-calls) · Nucleus fails: the handler doesn't load, or the session ends.

Why it matters

Math and JSON are objects, not functions: calling them throws.

Example

✗ Wrong

var m = Math();

✓ Right

var m = Math.max(1, 2);

How to fix it

Call one of its functions: Math.max(…), JSON.parse(…).

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-obj-calls": "off" } in your settings. Notepad++: Plugins › Nucleus Co-op handlers › Settings. Command line: ncdev lint --rule no-obj-calls=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