(parserPreset: ParserPreset | undefined)
| 530 | } |
| 531 | |
| 532 | function selectParserOpts(parserPreset: ParserPreset | undefined) { |
| 533 | if (typeof parserPreset !== "object") { |
| 534 | return undefined; |
| 535 | } |
| 536 | |
| 537 | if (typeof parserPreset.parserOpts !== "object") { |
| 538 | return undefined; |
| 539 | } |
| 540 | |
| 541 | return parserPreset.parserOpts; |
| 542 | } |
| 543 | |
| 544 | function loadFormatter(config: QualifiedConfig, flags: CliFlags): Promise<Formatter> { |
| 545 | const moduleName = flags.format || config.formatter || "@commitlint/format"; |