diff --git a/src/helpers/DateHelper.ts b/src/helpers/DateHelper.ts index 7483f96d..4c9942b3 100644 --- a/src/helpers/DateHelper.ts +++ b/src/helpers/DateHelper.ts @@ -57,7 +57,7 @@ export default class DateHelper { (window as any)[`dayjs_locale_${userLocale}`] || (await this.loadBrowserLocale(userLocale)); } else { - locale = await this.loadNodeLocale(userLocale) + locale = await this.loadNodeLocale(userLocale); } dayjs.locale(userLocale); this.locale = locale; @@ -240,6 +240,7 @@ export default class DateHelper { }); } + // eslint-disable-next-line class-methods-use-this loadNodeLocale(userLocale: string): Promise { return import(`dayjs/locale/${userLocale}.js`); } diff --git a/test/helpers/DateHelper.test.ts b/test/helpers/DateHelper.test.ts index 5b82ffb2..a0090d2f 100644 --- a/test/helpers/DateHelper.test.ts +++ b/test/helpers/DateHelper.test.ts @@ -53,7 +53,7 @@ describe('DateHelper', () => { expect(dateHelper.date().locale()).toEqual('fr'); expect(dateHelper.locale).toHaveProperty('name'); }); - }) + }); }); });