diff --git a/js/data/updateLocaleInfo.ts b/js/data/updateLocaleInfo.ts index 9a6e4e8a..f54cd67d 100644 --- a/js/data/updateLocaleInfo.ts +++ b/js/data/updateLocaleInfo.ts @@ -11,6 +11,7 @@ import child_process from 'child_process'; import fs from 'fs'; +import { LocaleData } from '../grunt/getStringMap.js'; /** * Converts locale data from babel/localeData.json into legacy formats used by rosetta and the website. @@ -25,7 +26,7 @@ import fs from 'fs'; */ // Load our ground source of truth -const localeData = JSON.parse( fs.readFileSync( '../../../babel/localeData.json', 'utf8' ) ); +const localeData: LocaleData = JSON.parse( fs.readFileSync( '../../../babel/localeData.json', 'utf8' ) ); // Construct the concise JS that defines the legacy locale-info format let localeInfoSnippet = '{'; @@ -44,11 +45,15 @@ for ( const locale of Object.keys( localeData ) ) { localeInfoSnippet = localeInfoSnippet.slice( 0, -1 ); // Close the object localeInfoSnippet += '\n}'; +type LocaleInfoObject = { + name: string; + localizedName: string; + direction: string; +}; -const localeInfo = {}; +const localeInfo: Record = {}; for ( const locale of Object.keys( localeData ) ) { - // @ts-expect-error, this may be deleted soon anyways localeInfo[ locale ] = { name: localeData[ locale ].englishName, localizedName: localeData[ locale ].localizedName, diff --git a/js/grunt/reportMedia.ts b/js/grunt/reportMedia.ts index 98b2ce6b..c88943ba 100644 --- a/js/grunt/reportMedia.ts +++ b/js/grunt/reportMedia.ts @@ -79,12 +79,6 @@ export default async ( repo: string ): Promise => { grunt.log.error( `not-annotated: ${abspath}` ); success = false; } - // Report if it is a problem - // @ts-expect-error - else if ( result.isProblematic === true ) { - grunt.log.error( `incompatible-license: ${abspath}` ); - success = false; - } } // Now iterate through the license.json entries and see which are missing files