SonarJS linter helper functions
    Preparing search index...

    Function getMainFunctionTokenLocation

    • Returns a location of the "main" function token:

      • function name for a function declaration, method or accessor
      • "function" keyword for a function expression
      • "=>" for an arrow function

      Type Parameters

      • T = string

      Parameters

      • fn: FunctionLike
      • parent: undefined | Node
      • context: RuleContext<string, T[]>

      Returns SourceLocation