Kenrick Tandrian
23 hours ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with
3 additions and
4 deletions
-
apps/api/src/services/i18n/i18n.service.ts
-
eslint.config.cjs
-
libs/common/src/lib/helper.ts
|
|
|
@ -65,7 +65,7 @@ export class I18nService { |
|
|
|
} |
|
|
|
|
|
|
|
private parseLanguageCode(aFileName: string) { |
|
|
|
const match = aFileName.match(/\.([a-zA-Z]+)\.xlf$/); |
|
|
|
const match = /\.([a-zA-Z]+)\.xlf$/.exec(aFileName); |
|
|
|
|
|
|
|
return match ? match[1] : DEFAULT_LANGUAGE_CODE; |
|
|
|
} |
|
|
|
|
|
|
|
@ -189,8 +189,7 @@ module.exports = [ |
|
|
|
|
|
|
|
// The following rules are part of @typescript-eslint/stylistic-type-checked |
|
|
|
// and can be remove once solved |
|
|
|
'@typescript-eslint/prefer-nullish-coalescing': 'warn', // TODO: Requires strictNullChecks: true |
|
|
|
'@typescript-eslint/prefer-regexp-exec': 'warn' |
|
|
|
'@typescript-eslint/prefer-nullish-coalescing': 'warn' // TODO: Requires strictNullChecks: true |
|
|
|
} |
|
|
|
})) |
|
|
|
]; |
|
|
|
|
|
|
|
@ -375,7 +375,7 @@ export function parseDate(date: string): Date { |
|
|
|
|
|
|
|
// Transform 'yyyyMMdd' format to supported format by parse function
|
|
|
|
if (date?.length === 8) { |
|
|
|
const match = date.match(/^(\d{4})(\d{2})(\d{2})$/); |
|
|
|
const match = /^(\d{4})(\d{2})(\d{2})$/.exec(date); |
|
|
|
|
|
|
|
if (match) { |
|
|
|
const [, year, month, day] = match; |
|
|
|
|