(parserPreset: ParserPreset | undefined)
| 575 | } |
| 576 | |
| 577 | function selectParserOpts(parserPreset: ParserPreset | undefined) { |
| 578 | if (typeof parserPreset !== "object") { |
| 579 | return undefined; |
| 580 | } |
| 581 | |
| 582 | if (typeof parserPreset.parserOpts !== "object") { |
| 583 | return undefined; |
| 584 | } |
| 585 | |
| 586 | return parserPreset.parserOpts; |
| 587 | } |
| 588 | |
| 589 | function loadFormatter(config: QualifiedConfig, flags: CliFlags): Promise<Formatter> { |
| 590 | const moduleName = flags.format || config.formatter || "@commitlint/format"; |