Nucleus handler tools › Docs › Checks

A backslash before a number

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

Why it matters

A backslash before a digit in a string is a character code, not a backslash: "\\45", not "\45" (which is "%"). Common in Windows paths with numbers.

Example

✗ Wrong

var p = "C:\45";

✓ Right

var p = "C:\\45";

How to fix it

Write two backslashes before the number.

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