diff --git a/src/createCatalog.ts b/src/createCatalog.ts index 25dd9e1..64ef333 100644 --- a/src/createCatalog.ts +++ b/src/createCatalog.ts @@ -4,8 +4,8 @@ export function createCatalog( catalogs: any, components: any, terms: any, - title: string, - lang: string + title: any, + lang: any ): any { return { title: title, @@ -31,17 +31,16 @@ function getComponents(components: any): any { function getChapters(catalogs: any): any { let chapters: string[] = []; - for(var index in catalogs) { + for(const index in catalogs) { if (!validateCatalogDataFiles(catalogs[index])) return; chapters = chapters.concat(catalogs[index].chapters); - // console.dir(catalogs[index].chapters); } return chapters; } function getStandards(catalogs: any): any { let standard: string[] = []; - for(var index in catalogs) { + for(const index in catalogs) { if (!validateCatalogDataFiles(catalogs[index])) return; standard = standard.concat(catalogs[index].standard); } diff --git a/src/librarian.ts b/src/librarian.ts index d125e31..f91e9e0 100644 --- a/src/librarian.ts +++ b/src/librarian.ts @@ -32,25 +32,25 @@ if (argv.catalog) { const catalog = argv.catalog; // Load data files. - let wcag20 = yaml.load( + const wcag20 = yaml.load( fs.readFileSync("./catalog/data/wcag-2.0.yaml").toString() ); - let wcag21 = yaml.load( + const wcag21 = yaml.load( fs.readFileSync("./catalog/data/wcag-2.1.yaml").toString() ); - let wcag22 = yaml.load( + const wcag22 = yaml.load( fs.readFileSync("./catalog/data/wcag-2.2.yaml").toString() ); - let section508 = yaml.load( + const section508 = yaml.load( fs.readFileSync("./catalog/data/508.yaml").toString() ); - let en301549 = yaml.load( + const en301549 = yaml.load( fs.readFileSync("./catalog/data/en-301-549.yaml").toString() ); - let components = yaml.load( + const components = yaml.load( fs.readFileSync("./catalog/data/components.yaml").toString() ); - let terms = yaml.load( + const terms = yaml.load( fs.readFileSync("./catalog/data/terms.yaml").toString() );