Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "pack/node/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 TslintAutoInspectRegistration

TslintAutoInspectRegistration: object

Provide an auto inspect registration that runs TSLint and returns a ProjectReview.

inspection

inspection: CodeInspection<ProjectReview, NoParameters> = RunTslintOnProject

name

name: string = "TSLintAutoInspection"

pushTest

pushTest: PushTest = IsTypeScript

Const TslintInspection

TslintInspection: object

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

description

description: string = "Run TSLint on project"

inspection

inspection: CodeInspection<ProjectReview, NoParameters> = RunTslintOnProject

intent

intent: string = "ts lint"

name

name: string = "RunTSLint"

Generated using TypeDoc