@@ -237,7 +237,7 @@ function parseArgs(argv: string[]): Args {
237237 } else if ( arg === "--evidence-dir" ) {
238238 args . evidenceDir = next ( ) ;
239239 } else if ( arg === "--help" || arg === "-h" ) {
240- process . stdout . write ( `Usage: node --import tsx scripts/render-maturity-docs.ts [options]
240+ process . stdout . write ( `Usage: node --import tsx scripts/qa/ render-maturity-docs.ts [options]
241241
242242Options:
243243 --taxonomy <path> Taxonomy YAML path (default: taxonomy.yaml)
@@ -258,8 +258,8 @@ Options:
258258 return args ;
259259}
260260
261- function readYaml < T > ( filePath : string ) : T {
262- return YAML . parse ( fs . readFileSync ( filePath , "utf8" ) ) as T ;
261+ function readYaml ( filePath : string ) : unknown {
262+ return YAML . parse ( fs . readFileSync ( filePath , "utf8" ) ) ;
263263}
264264
265265function assertObject ( value : unknown , label : string ) : Record < string , unknown > {
@@ -430,9 +430,9 @@ function expectedLtsSupported(
430430 scoreCategory: ScoreCategory,
431431 taxonomyCategory: TaxonomyCategory,
432432): boolean {
433- return Boolean (
433+ return (
434434 (scoreCategory.quality.score > 80 && scoreCategory.coverage.score > 90) ||
435- taxonomyCategory.human_lts_override === true,
435+ taxonomyCategory.human_lts_override === true
436436 );
437437}
438438
@@ -653,15 +653,17 @@ function familyTitle(value: string): string {
653653 );
654654}
655655
656- function markdownEscape(value: unknown): string {
656+ type RenderScalar = string | number | boolean | null | undefined;
657+
658+ function markdownEscape(value: RenderScalar): string {
657659 return String(value ?? "").replaceAll("|", "\\|");
658660}
659661
660- function yamlCode(value: unknown ): string {
662+ function yamlCode(value: RenderScalar ): string {
661663 return ` \`${markdownEscape ( value ) } \``;
662664}
663665
664- function htmlAttributeEscape ( value : unknown ) : string {
666+ function htmlAttributeEscape ( value : RenderScalar ) : string {
665667 return String ( value ?? "")
666668 . replaceAll ( "& ", "& amp ; ")
667669 . replaceAll ( '"', "& quot ; ")
@@ -1270,8 +1272,8 @@ function main(): void {
12701272 const taxonomyPath = path . normalize ( args . taxonomy ) ;
12711273 const scoresPath = path . normalize ( args . scores ) ;
12721274 const outputDir = path . normalize ( args . outputDir ) ;
1273- const taxonomy = readYaml < Taxonomy > ( taxonomyPath ) ;
1274- const scores = readYaml < Scores > ( scoresPath ) ;
1275+ const taxonomy = readYaml ( taxonomyPath ) as Taxonomy ;
1276+ const scores = readYaml ( scoresPath ) as Scores ;
12751277 validateTaxonomy ( taxonomy , taxonomyPath ) ;
12761278 const scoreWarnings = validateScores ( scores , scoresPath , taxonomy ) ;
12771279 const evidenceSummaries = readEvidenceSummaries ( args . evidenceDir ) ;
0 commit comments