Skip to content

Linter does not know about imported modules via setup tabΒ #44

@Steve-Mcl

Description

@Steve-Mcl

Current Behavior

Similar to #37 linter does not recognise variables generated by the function nodes imports

image

Expected Behavior

linter should include any variables created in the function nodes imports

Steps To Reproduce

  • Add a function node
  • Add os to imports on setup tab
  • Add code msg.payload = os.freemem()

Example flow

[
    {
        "id": "3dfba4cb62aa0313",
        "type": "function",
        "z": "6f432348c57a2fda",
        "name": "get free memory",
        "func": "msg.payload = os.freemem()\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [
            {
                "var": "os",
                "module": "os"
            }
        ],
        "x": 620,
        "y": 340,
        "wires": [
            [
                "888416a8bb047df7"
            ]
        ]
    }
]

Environment

  • nrlint version:
  • Node-RED version:
  • Node.js version:
  • npm version:
  • Platform/OS:
  • Browser:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions