Linter: [msg] 'Buffer' is not defined

Hi experts!

I'm using Buffer.from(xyz); in a function node and it works exactly as intended, but linter gives an error:

[msg] 'Buffer' is not defined.

How can I prevent this?

(Or: how to put ascii character 182 into a string and send it correct via tcp?)

How are you using the buffer ?

const bla = "hello"
const test = Buffer.from(bla)

msg.payload = test

return msg;

no linting error (?)

That does give the error, assuming that you have nrlint installed.

I think it is because Buffer is a nodejs thing, not basic javascript, though I think there is an option you can select somewhere to tell it to pick up the nodjs types.

@protonmw the workaround is to open the linter panel, click the dropdown arrow against the error and select to disable that warning.