So perhaps nrlint is the best alternative to achieve this.
I have nrlint and it shows nicely in bottom bar (notification) and right bar (details). But it doesn't show inside the editor. Node-RED simply doesn't have first-class configuring of javascript code. By that I mean custom rules that show in editor and also custom formatting (with triggers).
Have You thought about using Node-Red Projects?
https://nodered.org/docs/user-guide/projects/
Introducing projects
Projects are a new way to manage your flow files. Rather than treat your flows as a simple pair of files, they represent everything you need to create a redistributable Node-RED application.
They are backed by a Git repository, meaning all of the files are fully version controlled and allow developers to use familiar workflows to collaborate with others.
I came to know just a few days back that you can press ctrl+/ to quickly comment out the current line or selected block in a function node, no matter where your cursor is in that line. such a useful feature. may be everybody who use knows already, but it was a sweet discovery for me.
No, I didn't know that, thanks.
oh, well, if you want some Monaco tips, here you go...
| Shortcut | Explanation |
|---|---|
| F1 | Command Palette: Open the main search for all editor commands. |
| F2 | Rename Symbol: Rename all occurrences of a variable or function safely. |
| CTRL + D | Add Selection to Next Find Match: Selects the next occurrence of the current word - allowing you to edit/type in multiple locations. |
| CTRL + F | Find: Opens the find input (inside the editor). |
| CTRL + H | Find & Replace: Opens the find & replace input (inside the editor). |
| CTRL + Space | Trigger Suggestion: Manually trigger the IntelliSense/Autocomplete menu. |
| ALT + ↑ / ↓ | Move Line: Move the current line or selection up or down. |
| ALT + SHIFT + ↑ / ↓ | Copy Line: Copy the current line or above or below. |
| CTRL + ALT + ↑ / ↓ | Add Cursor: Add a cursor above or below. |
| CTRL + SHIFT + \ | Goto Bracket: Move the cursor to the matching curly/square/regular bracket. |
| ALT + Click | Multi-cursor: Add a secondary cursor wherever you click. |
F2, CTRL-D , CTRL-F , CTRL-SPACE are fully committed to the auld muscle memory and are huge speed ups - worth learning IMO.
There are lots more, but you can see most of them if you simply scroll the Command Palette (F1)
PS, these are also the defaults in VSCode (unsurprisingly)
Looks cool but what is a good use case for this one ![]()
Its for the mouse lovers (the slow way of doing CTRL-D then using cursor keys ![]()
TBF, I rarely use that unless my hand is on the mouse already

touchpad/trackpad feature then - it's interesting that some features really work better with a three-button physical mouse while others are designed for laptops with trackpads.
not to mention mobile touch screens.
Thanks folks, I probably should know of projects.
But when I go into the `settings.js file and search:
* - editorTheme
******************************************************************************/
/** The following property can be used to disable the editor. The admin API
* is not affected by this option. To disable both the editor and the admin
* API, use either the httpRoot or httpAdminRoot properties
*/
//disableEditor: false,
/** Customising the editor
* See https://nodered.org/docs/user-guide/runtime/configuration#editor-themes
* for all available options.
*/
editorTheme: {
theme: "midnight-red",
codeEditor: {
lib: "monaco", //can be "monaco" or "ace"
options: {
// /* theme - must match the file name of a theme in
// * packages/node_modules/@node-red/editor-client/src/vendor/monaco/dist/theme
// * e.g. "tomorrow-night", "upstream-sunburst", "github", "my-theme"
// */
theme: "vs-dark",
}
}
}
Maybe because I've had NR for many years now.
Someone.....
just add it...
editorTheme: {
projects: {
enabled: true
},
...other stuff...
Thanks.
I just did that and about to test it.
Rhetorical? question:
I am running NR 4.x.
Why wasn't that part added in any of the updates?
The update doesn't replace the settings file as you may have edited it.
Agreed.
But if new options are added, I would think it would be nice if those are added to the settings.js file. rather than just being ignored and not included.
At least that way idiots like me see there is another thing with which to play/adjust and not be blind sided by the whole thing.
Just saying.
If I remember correctly the upgrade script tells you where to find the new one to compare it with the existing one.
You are most likely correct.
It was only said in passing as I missed it - and it is kinda off topic.
It is just I got shown that failing (on my part) as I missed that addition to the config settings.js file.
Yes, that is standard on VSCode as well. One of my most used coding shortcuts.
F1 - yes, so much easier than ... well, I can't even remember the shortcut that most of the docs say.
F2 - is actually a common Windows shortcut for renaming things - see, Microsoft do have their occasional use! ![]()
ctrl-f/h - yup, use those all the time as well.
Copy Line: - if you don't have any text selected, ctrl-c then ctrl-v copies a line as well, I use that all the time too.
One of the slightly more annoying parts of Node-RED upgrades is that you don't get an obvious summary of changes to settings.js. I tend to make a copy of the vanilla settings.js when I install a new version and then use VSCode to do a visual comparison. The settings.js I use personally is rather better structured than the vanilla version so I can't do a direct comparison.
Not really possible since it is a node.js module and so may have all sorts of custom entries. For example, the default directly exports an object. But that prevents you from using one setting to update another which I find occasionally useful. So I assign the object to a constant that I then export at the end. More flexible. I also have other code I want to run on startup such as knowing the memory in use. I also look for a pid file which I take the number from and save to global, this is useful for restarting from a flow. And a few other things of use.