# Introducing Node Scorecards and a new node naming convention

**URL:** <https://discourse.nodered.org/t/introducing-node-scorecards-and-a-new-node-naming-convention/57559>\
**Category:** News\
**Created:** [31 January 2022 16:39 UTC](https://discourse.nodered.org/t/introducing-node-scorecards-and-a-new-node-naming-convention/57559 "2022-01-31T16:39:47Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [31 January 2022 16:39 UTC](https://discourse.nodered.org/t/introducing-node-scorecards-and-a-new-node-naming-convention/57559/1 "2022-01-31T16:39:47Z")

</div>

We've just published a [new post to the blog](https://nodered.org/blog/2022/01/31/introducing-scorecard) with a couple important updates for the Node-RED community.

I won't repeat the whole post here, but here are the key points:

1. We've introduced Node Scorecards on the Flow Library - these provide an overview of how well a node follows best practices. It's primarily focussed on packaging at this stage, but can be expanded to other areas in the future. Scorecards are generated when nodes are updated on the flow library and we've been running it in the background for a couple months - so all recently updated nodes will have scorecards. They are linked to from the sidebar of the node's page. You can see an example scorecard [here](https://flows.nodered.org/node/node-red-contrib-ngrok/scorecard).

2. We've updated our naming convention for _newly_ published nodes. We now recommend nodes to use a scoped name (like `@myScope/node-red-sample`). This will helps address a number of usability issues with the `node-red-contrib-` prefix we've used to date. As well as what is said in the blog post, the [documentation](https://nodered.org/docs/creating-nodes/packaging#naming) has been updated to match.

3. [`node-red-dev`](https://www.npmjs.com/package/node-red-dev) has been published which is the command-line tool that generates the scorecard. This lets you generate the scorecard locally whilst developing a node. In the future, this tool could be expanded with other tasks to help node authors.

Please read the [blog post for the full details](https://nodered.org/blog/2022/01/31/introducing-scorecard).

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [31 January 2022 16:50 UTC](https://discourse.nodered.org/t/introducing-node-scorecards-and-a-new-node-naming-convention/57559/2 "2022-01-31T16:50:11Z")

</div>



---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [31 January 2022 17:23 UTC](https://discourse.nodered.org/t/introducing-node-scorecards-and-a-new-node-naming-convention/57559/3 "2022-01-31T17:23:57Z")

</div>

Nice work.

One minor issue running against uibuilder vNext, looks like the node parser can't cope with the alternate layout for the .js file right now.

```auto
C:\src\node-red-contrib-uibuilder [vNext ≡ +1 ~4 -0 !]
> node-red-dev validate
    ---Validating Package---
   node-red-contrib-uibuilder@5.0.0-dev
✅ Package is Apache-2.0 licensed
✅ Repository/Bugs Link Supplied
 » Warning: P04 New Packages should use a scoped name
✅ Package uses a valid name
✅ No similar named packages found
✅ Node-RED Keyword Found
✅ Compatible with Node-RED v2.2.0
✅ Compatible with Node-RED v1.3.7
 » Warning: P07 Minimum Node version is not compatible with minimum supported Node-RED Version Node v12.0.0
    ---Validating Nodes---
Unable to parse nodes/uibuilder.js
Unable to parse nodes/uib-sender.js
Unable to parse nodes/uib-cache.js
✅ Nodes all have unique names
✅ Examples found for all nodes
    ---Validating Dependencies---
 » Warning: D01 Package has a large number of dependencies (14)
> ✅ No incompatible packages found in dependency tree
 » Warning: D03 execa is not at latest version, package.json specifies: ^5.1.1, latest is: 6.0.0
Complete

```

Similarly on the wiser nodes:

```auto
C:\src\node-red-contrib-drayton-wiser [main ≡ +4 ~4 -0 !]
> node-red-dev validate
    ---Validating Package---
   @totallyinformation/node-red-contrib-drayton-wiser@0.0.3
✅ Package is Apache-2.0 licensed
✅ Repository/Bugs Link Supplied
✅ Package uses a Scoped Name
✅ Package uses a Scoped Name
✅ No similar named packages found
✅ Node-RED Keyword Found
✅ Compatible with Node-RED v2.2.0
 » Warning: P06 NOT Compatible with Node-RED v1.3.7
 » Warning: P07 Minimum Node version is not compatible with minimum supported Node-RED Version Node v12.0.0
    ---Validating Nodes---
Unable to parse nodes/wiser.js
Unable to parse nodes/wiser-listen.js
✅ Nodes all have unique names
 » Warning: No examples found
    ---Validating Dependencies---
✅ Package has 5 dependencies
could not find a satisfactory version for string github:totallyinformation/ti-common-event-handler
✅ No incompatible packages found in dependency tree
✅ All prod dependencies using latest versions
Complete

```

Re the minimum node warning - it would, I think, be better to show what node-red requires and what the node requires? While I know, if that is also shown in the flows library, other people wouldn't know what the difference was. In the case of my newer nodes, the difference is that I have a minimum node.js version of 12.20 as there are a number of bug fixes and some revisions in that version that would probably be needed by the code in the nodes.

* * *

Also, the flow entry for the wiser nodes show:

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/9/c919fe9ad3f1370c1f67370dc1f75d2fa8bbb5fc.png)

But the package.json certainly has it:

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/6/96bec7b42d099d6e7f2e31f4445b809ecd5dd391.png)

* * *

UPDATE: re `Unable to parse` in checks.

Checking the code, it appears that only the .html is actually checked, not the .js file so my assumption was wrong. The reason the `checkNodes` funtion is struggling is that my .html files do not have `type="...."` on the javascript script tag - this is correct for HTML v5.

[checknodes.js - node-red/node-red-dev-cli - GitHub1s](https://github1s.com/node-red/node-red-dev-cli/blob/HEAD/src/libs/checknodes.js#L10-L11)

```auto
/<script.+?type=['"]text\/javascript['"].*?>([\S\s]*?)<\/script>/ig

```

From MDN:

> The HTML5 specification urges authors to omit the attribute rather than provide a redundant MIME type.

---

<div class="post-metadata">

**Author:** ![akashtalole](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/akashtalole/32/30002_2.png) [@akashtalole](https://discourse.nodered.org/u/akashtalole)\
**Post date:** [31 January 2022 17:24 UTC](https://discourse.nodered.org/t/introducing-node-scorecards-and-a-new-node-naming-convention/57559/4 "2022-01-31T17:24:04Z")

</div>

This is helpful for getting missing info for any of your own node or others as well.

---

<div class="post-metadata">

**Author:** ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)\
**Post date:** [31 January 2022 17:30 UTC](https://discourse.nodered.org/t/introducing-node-scorecards-and-a-new-node-naming-convention/57559/5 "2022-01-31T17:30:33Z")

</div>

I was also going to raise the node version warning being inaccurate.  
I am also getting the below - despite having entries for both `node` and `npm`

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/f/4fe8dd25e0057ff1cb86cc9a89fb116cdce4d36a.png)

> <https://github.com/zwave-js/node-red-contrib-zwave-js/blob/9f251b1fe5fc26f1d4e17a55fc5d8cbc02c10794/package.json#L20>

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [31 January 2022 18:01 UTC](https://discourse.nodered.org/t/introducing-node-scorecards-and-a-new-node-naming-convention/57559/6 "2022-01-31T18:01:31Z")

</div>

> [@marcus-j-davies](#):
>
> I was also going to raise the node version warning being inaccurate.

Please raise an issue here: [GitHub - node-red/node-red-dev-cli: Command-line tool for Node-RED Node authors](https://github.com/node-red/node-red-dev-cli)

---

<div class="post-metadata">

**Author:** ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)\
**Post date:** [31 January 2022 18:03 UTC](https://discourse.nodered.org/t/introducing-node-scorecards-and-a-new-node-naming-convention/57559/7 "2022-01-31T18:03:11Z")

</div>

Exactly what I was doing 👍

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [31 January 2022 22:43 UTC](https://discourse.nodered.org/t/introducing-node-scorecards-and-a-new-node-naming-convention/57559/8 "2022-01-31T22:43:17Z")

</div>

Although I check the flows site, I usually install nodes via the palette, will the scorecard eventually also arrive in the UI ? Especially with version dependencies it can help reduce issues that we often see in the forums (installing old nodes etc).

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [31 January 2022 23:31 UTC](https://discourse.nodered.org/t/introducing-node-scorecards-and-a-new-node-naming-convention/57559/9 "2022-01-31T23:31:36Z")

</div>

Yes, we are thinking about how to extend the catalog format to include extra information about the modules.

---

<div class="post-metadata">

**Author:** ![HaroldPetersInskipp](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/haroldpetersinskipp/32/42319_2.png) [@HaroldPetersInskipp](https://discourse.nodered.org/u/HaroldPetersInskipp)\
**Post date:** [1 February 2022 01:28 UTC](https://discourse.nodered.org/t/introducing-node-scorecards-and-a-new-node-naming-convention/57559/10 "2022-02-01T01:28:49Z")

</div>

As a somewhat inexperienced developer, I've updated my nodes to reflect the new guidelines. In doing this, I added minimum Node-red and node versions to my "package.json" (just kinda guessed???). However, the question crossed my mind, how can I know what versions to put? Do I need to familiarize myself with the version history and changes of both of these projects or is there an easier way?

---

<div class="post-metadata">

**Author:** ![alex88](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/alex88/32/55523_2.png) [@alex88](https://discourse.nodered.org/u/alex88)\
**Post date:** [1 February 2022 08:22 UTC](https://discourse.nodered.org/t/introducing-node-scorecards-and-a-new-node-naming-convention/57559/11 "2022-02-01T08:22:45Z")

</div>

I started to read up on this via the link you shared @knolleary and found the link to "Flow Library" [text in red] on this page does not work. Is that intentional?

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/3/a369d3f17bd09f5ed78a7383d914acb9fefcd918.png)

> **[Introducing the Node Scorecard](https://nodered.org/blog/2022/01/31/introducing-scorecard)**
>
> Checking the quality of nodes in the ecosystem

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [1 February 2022 08:33 UTC](https://discourse.nodered.org/t/introducing-node-scorecards-and-a-new-node-naming-convention/57559/12 "2022-02-01T08:33:05Z")

</div>

> [@alex88](#):
>
> . Is that intentional?

No. It was not my intention to have a broken link in the post.

---

<div class="post-metadata">

**Author:** ![alex88](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/alex88/32/55523_2.png) [@alex88](https://discourse.nodered.org/u/alex88)\
**Post date:** [1 February 2022 08:34 UTC](https://discourse.nodered.org/t/introducing-node-scorecards-and-a-new-node-naming-convention/57559/13 "2022-02-01T08:34:46Z")

</div>

Poor choice of words early in the morning 🙂

---

<div class="post-metadata">

**Author:** ![rko](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rko/32/45807_2.png) [@rko](https://discourse.nodered.org/u/rko)\
**Post date:** [1 February 2022 08:47 UTC](https://discourse.nodered.org/t/introducing-node-scorecards-and-a-new-node-naming-convention/57559/14 "2022-02-01T08:47:45Z")

</div>

I read "Introducing Node Scarecrow" at first 🤣

Great work!

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [1 February 2022 10:06 UTC](https://discourse.nodered.org/t/introducing-node-scorecards-and-a-new-node-naming-convention/57559/15 "2022-02-01T10:06:43Z")

</div>

> [@HaroldPetersInskipp](#):
>
> I added minimum Node-red and node versions to my "package.json" (just kinda guessed???). However, the question crossed my mind, how can I know what versions to put? Do I need to familiarize myself with the version history and changes of both of these projects or is there an easier way?

In general, it is best to use a node.js versions that matches the versions required by the version of Node-RED you have chosen. Choosing the node-red version is slightly tricky and I would suggest that yes, you may need to be aware of the changes.

In general, Node-RED supports the currently long-term supported versions of Node.js so of course that changes over time.

---

<div class="post-metadata">

**Author:** ![Christian-Me](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/christian-me/32/10774_2.png) [@Christian-Me](https://discourse.nodered.org/u/Christian-Me)\
**Post date:** [1 February 2022 10:10 UTC](https://discourse.nodered.org/t/introducing-node-scorecards-and-a-new-node-naming-convention/57559/16 "2022-02-01T10:10:06Z")

</div>

BTW if you work on the Palette it would be great to have the link to the flow library page for installed nodes present (same as on the install tab) to take a look into any release nodes (to avoid any surprises due to breaking changes before hitting the update button)  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/1/b1a2ca8acccf38b12ade00df49d31a51075a208b.png)

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/4/041de4727835d39157f47d7311593007cda293e5.png)  
(currently you have to switch to [flows.node-red.org](http://flows.node-red.org) or to the install tab and search for the node you plan to update)

A kind of warning system for breaking changes or a structured release nodes system (like a `release-nodes.md` file available in a drop-down right in the palette dialog) would be nice.

---

<div class="post-metadata">

**Author:** ![sverre](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sverre/32/54040_2.png) [@sverre](https://discourse.nodered.org/u/sverre)\
**Post date:** [1 February 2022 15:46 UTC](https://discourse.nodered.org/t/introducing-node-scorecards-and-a-new-node-naming-convention/57559/17 "2022-02-01T15:46:33Z")

</div>

Is it OK to use the `node-red-contrib-` naming under a scope (as in `@myScope/node-red-contrib-sample`)? I would think so, as per the documentation:

> If you use a scoped name, there are no further requirements on the name.

We just published our first couple of nodes as `@myScope/node-red-contrib-`, and it just seems tidier (for lack of a better word) to keep using the same naming convention for our future nodes.

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [1 February 2022 15:51 UTC](https://discourse.nodered.org/t/introducing-node-scorecards-and-a-new-node-naming-convention/57559/18 "2022-02-01T15:51:35Z")

</div>

> [@sverre](#):
>
> Is it OK to use the `node-red-contrib-` naming under a scope

Yes it is.

---

<div class="post-metadata">

**Author:** ![sverre](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sverre/32/54040_2.png) [@sverre](https://discourse.nodered.org/u/sverre)\
**Post date:** [1 February 2022 16:07 UTC](https://discourse.nodered.org/t/introducing-node-scorecards-and-a-new-node-naming-convention/57559/19 "2022-02-01T16:07:06Z")

</div>

Excellent. Thanks for the quick response!

---

<div class="post-metadata">

**Author:** ![sverre](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sverre/32/54040_2.png) [@sverre](https://discourse.nodered.org/u/sverre)\
**Post date:** [1 February 2022 16:19 UTC](https://discourse.nodered.org/t/introducing-node-scorecards-and-a-new-node-naming-convention/57559/20 "2022-02-01T16:19:55Z")

</div>

> [@knolleary](#):
>
> - We've introduced Node Scorecards on the Flow Library - these provide an overview of how well a node follows best practices.

Is it kosher (or maybe even advisable) to publish a new version of a node "just" to improve the scorecard? On the one hand, it seems kinda spammy to publish a new release without so much as a bug fix, but on the other hand, providing better information to users could also be called a feature.

[Next page](https://discourse.nodered.org/t/introducing-node-scorecards-and-a-new-node-naming-convention/57559.md?page=2)
