Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
178 additions
and
139 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,6 +37,7 @@ | |
"@commitlint/utils": "^8.3.4" | ||
}, | ||
"dependencies": { | ||
"@commitlint/types": "^8.3.5", | ||
"chalk": "^3.0.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import chalk from 'chalk'; | ||
import {QualifiedRules} from './load'; | ||
import {RuleConfigSeverity} from './rules'; | ||
|
||
export type Formatter = ( | ||
report: FormattableReport, | ||
options: FormatOptions | ||
) => string; | ||
|
||
export interface FormattableProblem { | ||
level: RuleConfigSeverity; | ||
name: keyof QualifiedRules; | ||
message: string; | ||
} | ||
|
||
export interface FormattableResult { | ||
errors?: FormattableProblem[]; | ||
warnings?: FormattableProblem[]; | ||
} | ||
|
||
export interface WithInput { | ||
input?: string; | ||
} | ||
|
||
export interface FormattableReport { | ||
results?: (FormattableResult & WithInput)[]; | ||
} | ||
|
||
export type ChalkColor = keyof typeof chalk; | ||
|
||
export interface FormatOptions { | ||
color?: boolean; | ||
signs?: readonly [string, string, string]; | ||
colors?: readonly [ChalkColor, ChalkColor, ChalkColor]; | ||
verbose?: boolean; | ||
helpUrl?: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.