🎉 nrlint 1.1.0 released

We've just published a long overdue update for nrlint - the Node-RED Flow Linter.

Aside from a number of fixes, it adds new options to the no-unnamed-functions and no-unnamed-links checks to optionally also warn about any Function/Link nodes that have default names applied.

The changelog is available on GitHub:


So running npm install nrlint to update worked great on all but one of my instances.

On a Rasperry Pi 4 8GB running Debian GNU/Linux 10 (buster) Node v16.16.0 npm v8.11.0 Node-RED v2.2.2

I received:

npm ERR! Cannot convert undefined or null to object

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/pi/.npm/_logs/2022-07-26T13_54_17_122Z-debug-0.log

Looking through the log I found:

http fetch GET 200 https://registry.npmjs.org/node-red-contrib-google-translate-plus 10ms (cache hit)
1392 313 timing metavuln:packument:node-red-contrib-google-translate-plus Completed in 12ms
1393 314 timing command:install Completed in 7631ms
1394 315 verbose stack TypeError: Cannot convert undefined or null to object
1395 315 verbose stack     at Function.keys (<anonymous>)
1396 315 verbose stack     at Advisory.load (/usr/lib/node_modules/npm/node_modules/@npmcli/metavuln-calculator/lib/advisory.js:109:33)
1397 315 verbose stack     at Calculator.[calculate] (/usr/lib/node_modules/npm/node_modules/@npmcli/metavuln-calculator/lib/index.js:60:14)
1398 315 verbose stack     at async Promise.all (index 0)
1399 315 verbose stack     at async Map.[init] (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/audit-report.js:186:9)
1400 315 verbose stack     at async Map.run (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/audit-report.js:109:7)
1401 315 verbose stack     at async Arborist.reify (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:158:5)
1402 315 verbose stack     at async Install.exec (/usr/lib/node_modules/npm/lib/commands/install.js:156:5)
1403 315 verbose stack     at async module.exports (/usr/lib/node_modules/npm/lib/cli.js:78:5)

After uninstalling node-red-contrib-google-translate-plus the installation of nrlint is successful. So it appears to be some conflict with the node and nrlint.

I do not require assistance, but I thought I'd bring it up nonetheless.

I have just upgraded nrlint from 1.0.2 to 1.1.0 and find that it is hogging the processor in the browser (chrome and firefox). Reverting to 1.0.2 restores normal operation.

Running NR 3.0.1
Presumably it is some code in one of my functions causing the problem but I have no idea how to isolate which one. Nothing showing in the linter pane in the editor.

@Colin can you raise an issue? If there's any chance of sharing your flows (via private message is fine) so I can see what's tripping it up, that would be great.

There were some changes made last year (which have been sat waiting to be released for ages) to improve the loop detection code. If I had to guess, that would be the type of thing that could cause the lint worker to get itself into a loop..

Issue raised and flow shared privately.

In case anyone else comes across this thread regarding high CPU usage with nrlint 1.1.0 - I have tracked it down to an upstream issue with the eslint plugin we use to lint Function nodes. If you have a function node that contains \n inside a string, it will cause eslint to hang. Very strange - but also quite pleasing to have narrowed it down from a 500kb flow file @Colin provided me to a single character in one node.

Waiting to hear on the upstream issue before deciding what to do next with the issue.


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