Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "lib/inspection/tslint"

Index

Type aliases

TslintResults

TslintResults: TslintResult[]

Variables

Const tsLintReviewCategory

tsLintReviewCategory: "Tslint" = "Tslint"

Functions

Const RunTslintOnProject

  • RunTslintOnProject(p: Project): Promise<ProjectReview>
  • Run TSLint on a project with a tslint.json file, using the standard version of TSLint and its configuration, i.e., the ones in this project. At most 20 TSLint violations are returned, since they are used to create a GitHub issue and if the body of that POST is too large, it is rejected.

    Parameters

    • p: Project

    Returns Promise<ProjectReview>

mapTslintResultsToReviewComments

  • mapTslintResultsToReviewComments(tslintOutput: string, dir: string): ReviewComment[]
  • Convert the JSON output of TSLint to proper ReviewComments. If any part of the process fails, an empty array is returned.

    Parameters

    • tslintOutput: string

      string output from running tslint that will be parsed and converted.

    • dir: string

    Returns ReviewComment[]

    TSLint errors and warnings as ReviewComments

tslintReviewComment

  • tslintReviewComment(detail: string, rule: string, severity?: Severity, sourceLocation?: SourceLocation): ReviewComment
  • Return a review comment for a TSLint violation.

    Parameters

    • detail: string
    • rule: string
    • Default value severity: Severity = "info"
    • Optional sourceLocation: SourceLocation

    Returns ReviewComment

Object literals

Const TslintInspection

TslintInspection: object

Provide a code inspection that runs TSLint and returns a ProjectReview.

description

description: string = "Run TSLint on project"

inspection

inspection: function = RunTslintOnProject

Type declaration

    • (p: Project, papi: PushAwareParametersInvocation<P>): Promise<R>
    • Parameters

      • p: Project
      • papi: PushAwareParametersInvocation<P>

      Returns Promise<R>

intent

intent: string = "ts lint"

name

name: string = "RunTSLint"

Generated using TypeDoc