Monaco editor error question

I have a function that has code

let z = msg.humidity

msghumidity = {
    payload: 'RH% ' + z,
let w = msg.payload;
w = Number(w);
let f = (w * 1.8) + 32;
let num = f;
let n = num.toFixed(2);
msgtempf = {
    payload: 'Deg F ' + n,
msgtempc = {
    payload: 'Deg C ' + w,

It is not a big deal but is there a way to get rid of the red underlines? It's not really an error.

[EDIT] it shows up when I typed the question but not when I posted but the msg.humidity and msghumidity have red underlines as well as a few others. Again it's not an error but appears as one.

Hover over the red underline, what does quick fix show when you click it?

Spoiler (click blurred text to reveal)...


You don't declare the msg objects.


const msghumidity = {
    payload: 'RH% ' + z,
1 Like

wow, obviously that editor is going to force me to polish up my coding skills

Thanks muchly


The reason I didnt disable that error in the node-red core was because of the benefits it gives you - like highlighting undefined values and mis-typed variable names.

See this post: Using Monaco editor - monaco branch now in fork (PR#2971) - #98 by Steve-Mcl (click the reveal)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.