Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • ESLintCheck

Index

Constructors

constructor

Properties

Private cacheFilePath

cacheFilePath: string = 'node_modules/.cache/flh/eslintcache.json'

缓存文件路径(eslintOptions.cacheLocation)。默认为 <config.rootDir>/node_modules/.cache/flh/eslintcache.json

Private logger

logger: Logger

Private stats

stats: { rules: Record<string, number>; startTime: number; success: boolean; totalFiles: number } = ...

统计信息

Type declaration

  • rules: Record<string, number>
  • startTime: number
  • success: boolean
  • totalFiles: number

Private whiteList

whiteList: {} = ...

白名单列表

Type declaration

  • [filepath: string]: "e" | "w"

Accessors

statsInfo

  • get statsInfo(): { rules: Record<string, number>; startTime: number; success: boolean; totalFiles: number }
  • 返回执行结果统计信息

    Returns { rules: Record<string, number>; startTime: number; success: boolean; totalFiles: number }

    • rules: Record<string, number>
    • startTime: number
    • success: boolean
    • totalFiles: number

Methods

Private check

  • check(lintList?: string[]): Promise<{ errorCount: number; errorFiles: string[]; fixableErrorCount: number; fixableWarningCount: number; fixedCount: number; isPassed: boolean; lintList: string[]; total: number; warningCount: number; warningFiles: string[] }>
  • 执行 eslint 校验

    Parameters

    • lintList: string[] = ...

    Returns Promise<{ errorCount: number; errorFiles: string[]; fixableErrorCount: number; fixableWarningCount: number; fixedCount: number; isPassed: boolean; lintList: string[]; total: number; warningCount: number; warningFiles: string[] }>

Private checkInChildProc

Private checkInWorkThreads

Private getESLintOptions

  • getESLintOptions(lintList: string[]): Options

Private getInitStats

  • getInitStats(): { rules: Record<string, number>; startTime: number; success: boolean; totalFiles: number }
  • 获取初始化的统计信息

    Returns { rules: Record<string, number>; startTime: number; success: boolean; totalFiles: number }

    • rules: Record<string, number>
    • startTime: number
    • success: boolean
    • totalFiles: number

Private init

  • init(): void

parseConfig

start

Generated using TypeDoc