SonarJS linter helper functions
    Preparing search index...

    Function getNodeParent

    • Returns the parent of an ESLint node

      This function assumes that an ESLint node exposes a parent property, which is always defined. However, it's better to use getParent if it is possible to retrieve the parent based on the rule context.

      It should eventually disappear once we come up with a proper solution against the conflicting typings between ESLint and TypeScript ESLint when it comes to the parent of a node.

      Parameters

      • node: Node

        an ESLint node

      Returns Node

      the parent node