# How to disable specific nrlint rule?

**URL:** <https://discourse.nodered.org/t/how-to-disable-specific-nrlint-rule/94673>\
**Category:** General\
**Created:** [16 January 2025 09:34 UTC](https://discourse.nodered.org/t/how-to-disable-specific-nrlint-rule/94673 "2025-01-16T09:34:40Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ThingsTinkerer](https://avatars.discourse-cdn.com/v4/letter/t/91b2a8/32.png) [@ThingsTinkerer](https://discourse.nodered.org/u/ThingsTinkerer)\
**Post date:** [16 January 2025 09:34 UTC](https://discourse.nodered.org/t/how-to-disable-specific-nrlint-rule/94673/1 "2025-01-16T09:34:40Z")

</div>

When using nrlint, it doesn't take into account module import (as reported here: [Similar to · Issue #44 · node-red/nrlint](https://github.com/node-red/nrlint/issues/44)

It is a simple click in the editor to ignore, adding this to description of node or flow:  
`// nrlint function-eslint:off`

However, that disables all rules. How can we disable specific rules? Like the import rule. Further more, it would be a great option to be able to ignore linting for specific lines with comments. Is that possible?

---

<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:** [16 January 2025 09:42 UTC](https://discourse.nodered.org/t/how-to-disable-specific-nrlint-rule/94673/2 "2025-01-16T09:42:04Z")

</div>

Maybe with:

```js
// nrlint eslint-disable-line

```

Add the rule to disable/ignore after `// nrlint`

---

<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:** [16 January 2025 09:46 UTC](https://discourse.nodered.org/t/how-to-disable-specific-nrlint-rule/94673/3 "2025-01-16T09:46:49Z")

</div>

The suggestion from @GogoVega is close - don't add the `nrlint` bit at the start, otherwise `eslint` (the JavaScript linter we use) won't 'see' it.

To disable linting on an individual line:

```auto
// eslint-disable-line

```

To disable linting of all the code in the node:

```auto
// eslint-disable

```

---

<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:** [16 January 2025 09:48 UTC](https://discourse.nodered.org/t/how-to-disable-specific-nrlint-rule/94673/4 "2025-01-16T09:48:25Z")

</div>

Not sure but the rule should be `no-undef`.

---

<div class="post-metadata">

**Author:** ![ThingsTinkerer](https://avatars.discourse-cdn.com/v4/letter/t/91b2a8/32.png) [@ThingsTinkerer](https://discourse.nodered.org/u/ThingsTinkerer)\
**Post date:** [16 January 2025 09:52 UTC](https://discourse.nodered.org/t/how-to-disable-specific-nrlint-rule/94673/5 "2025-01-16T09:52:47Z")

</div>

Glorious, thanks!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [30 January 2025 09:53 UTC](https://discourse.nodered.org/t/how-to-disable-specific-nrlint-rule/94673/6 "2025-01-30T09:53:25Z")

</div>

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