# Flow Linter error

**URL:** https://discourse.nodered.org/t/flow-linter-error/94513
**Category:** General
**Created:** [10 January 2025 16:07 UTC](https://discourse.nodered.org/t/flow-linter-error/94513 "2025-01-10T16:07:36Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Giamma](https://avatars.discourse-cdn.com/v4/letter/g/e47774/32.png) [@Giamma](https://discourse.nodered.org/u/Giamma)
#### Post date: [10 January 2025 16:07 UTC](https://discourse.nodered.org/t/flow-linter-error/94513/1 "2025-01-10T16:07:36Z")

</div>

hi,  
today I installed Flow Linter and have been reported many errors ...  
I fixed most of them but I have 3 errors pending ...

1° error

```auto
[msg] Parsing error: Unexpected token

```

I have this error in all the function where I use  
setTimeout(() =\> { node.send([output[0]]) }, 2000);  
like this:

```auto
const output = [null];
output[0] = { reset: true };
setTimeout(() => { node.send([output[0]]) }, 2000);

```

2° error

```auto
[msg] Do not access Object.prototype method 'hasOwnProperty' from target object.

```

this is the function:

```auto
if (msg.hasOwnProperty('ui_control') && msg.ui_control.callback === "renderComplete") {
    var msgOut = {
        payload: {
            command: "selectRow",
            arguments: [1],
            returnPromise: false
        }
    }
    return msgOut;
}

```

3\* error

```auto
[msg] 'suncalc' is not defined

```

and this is the function:

```auto
function sunData() {
    return suncalc.getSunTimes(new Date(), 43.690419, 10.816769);
}
function moonData() {
    return suncalc.getMoonData(new Date(), 43.690419, 10.816769);
}

```

Can you help me to fix these errors?

version 4.0.3  
node.js v20.15.0  
Linux 6.1.21-v8+ arm LE  
Dashborad version 3.6.5  
Dashboard 2.0 v1.8.1  
Raspberry Pi4 - SO raspberry

---

<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: [10 January 2025 16:34 UTC](https://discourse.nodered.org/t/flow-linter-error/94513/2 "2025-01-10T16:34:40Z")

</div>

Hi @Giamma

I think you've hit some areas the flow linter doesn't handle well today and is in need of some updates.

Issue 1 - I think this is because you're using `=>` functions which is newer syntax than the version of eslint bundled in the flow linter supports.

Issue 2 - This is actually a genuine warning. Rather than use `msg.hasOwnProperty('ui_control')`, the better syntax is `Object.hasOwn(msg, 'ui_control')`

Issue 3 - The linter doesn't know about the additional modules being imported into the function node (ie `suncalc`). The linter needs updating to handle that properly.

So, other than issue 2 which you can address yourself, the others are issues with the linter itself.

---

<div class="post-metadata">

### Author: ![Giamma](https://avatars.discourse-cdn.com/v4/letter/g/e47774/32.png) [@Giamma](https://discourse.nodered.org/u/Giamma)
#### Post date: [10 January 2025 16:38 UTC](https://discourse.nodered.org/t/flow-linter-error/94513/3 "2025-01-10T16:38:04Z")

</div>

Ok, thank you very much .....

---

<div class="post-metadata">

### Author: ![Giamma](https://avatars.discourse-cdn.com/v4/letter/g/e47774/32.png) [@Giamma](https://discourse.nodered.org/u/Giamma)
#### Post date: [10 January 2025 17:38 UTC](https://discourse.nodered.org/t/flow-linter-error/94513/4 "2025-01-10T17:38:58Z")

</div>

In setting.js I commented this line:

```auto
module.exports {
    nrlint: require("./.nrlintrc.js"),
}

```

and re-start node red but I always have the linter sidebar available in my editor,  
how can I delete it?

---

<div class="post-metadata">

### Author: ![GogoVega](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gogovega/32/71313_2.png) [@GogoVega](https://discourse.nodered.org/u/GogoVega)
#### Post date: [10 January 2025 19:17 UTC](https://discourse.nodered.org/t/flow-linter-error/94513/5 "2025-01-10T19:17:11Z")

</div>

Did you have refreshed your browser?

---

<div class="post-metadata">

### Author: ![Giamma](https://avatars.discourse-cdn.com/v4/letter/g/e47774/32.png) [@Giamma](https://discourse.nodered.org/u/Giamma)
#### Post date: [10 January 2025 19:25 UTC](https://discourse.nodered.org/t/flow-linter-error/94513/6 "2025-01-10T19:25:01Z")

</div>

Yes I do ...

---

<div class="post-metadata">

### Author: ![GogoVega](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gogovega/32/71313_2.png) [@GogoVega](https://discourse.nodered.org/u/GogoVega)
#### Post date: [10 January 2025 19:26 UTC](https://discourse.nodered.org/t/flow-linter-error/94513/7 "2025-01-10T19:26:30Z")

</div>

And removed the dependency?

```bash
cd .node-red
npm remove nrlint

```

Can be done in Palette Manager too.

---

<div class="post-metadata">

### Author: ![Giamma](https://avatars.discourse-cdn.com/v4/letter/g/e47774/32.png) [@Giamma](https://discourse.nodered.org/u/Giamma)
#### Post date: [10 January 2025 19:30 UTC](https://discourse.nodered.org/t/flow-linter-error/94513/8 "2025-01-10T19:30:29Z")

</div>

Ok, I removed nrlint, thank you ....
