diff --git a/.eslintrc.json b/.eslintrc.json index 9079088e..885b0b92 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -12,7 +12,8 @@ }, "extends": [ "eslint:recommended", - "plugin:@typescript-eslint/strict", + "plugin:@typescript-eslint/strict-type-checked", + "plugin:@typescript-eslint/stylistic-type-checked", "plugin:@angular-eslint/recommended", "plugin:@angular-eslint/template/process-inline-templates" ], diff --git a/package-lock.json b/package-lock.json index 2a2cda09..b20be2d1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,12 +9,12 @@ "version": "0.0.0", "dependencies": { "@angular/animations": "~16.1.0", - "@angular/cdk": "^16.1.5", + "@angular/cdk": "~16.1.0", "@angular/common": "~16.1.0", "@angular/compiler": "~16.1.0", "@angular/core": "~16.1.0", "@angular/forms": "~16.1.0", - "@angular/material": "^16.1.5", + "@angular/material": "~16.1.0", "@angular/platform-browser": "~16.1.0", "@angular/platform-browser-dynamic": "~16.1.0", "@angular/router": "~16.1.0", @@ -40,7 +40,7 @@ "@typescript-eslint/parser": "^6.0.0", "cpy-cli": "^4.2.0", "dayjs": "^1.11.7", - "eslint": "^8.45.0", + "eslint": "^8.39.0", "jasmine-core": "~5.0.0", "karma": "~6.4.0", "karma-chrome-launcher": "~3.2.0", diff --git a/projects/angular-ecmascript-intl/src/lib/relative-time/relative-time.pipe.spec.ts b/projects/angular-ecmascript-intl/src/lib/relative-time/relative-time.pipe.spec.ts index fcb979a2..d1140d88 100644 --- a/projects/angular-ecmascript-intl/src/lib/relative-time/relative-time.pipe.spec.ts +++ b/projects/angular-ecmascript-intl/src/lib/relative-time/relative-time.pipe.spec.ts @@ -212,6 +212,7 @@ describe('RelativeTimePipe', () => { testUnit.transform(0); tick(60000); + // eslint-disable-next-line @typescript-eslint/unbound-method expect(cdrMock.markForCheck).toHaveBeenCalledTimes(1); testUnit.ngOnDestroy(); @@ -221,6 +222,7 @@ describe('RelativeTimePipe', () => { testUnit.transform(new Date()); tick(600000); + // eslint-disable-next-line @typescript-eslint/unbound-method expect(cdrMock.markForCheck).toHaveBeenCalledTimes(10); testUnit.ngOnDestroy(); diff --git a/projects/angular-ecmascript-intl/src/lib/relative-time/relative-time.pipe.ts b/projects/angular-ecmascript-intl/src/lib/relative-time/relative-time.pipe.ts index 5ee53cac..f6f12240 100644 --- a/projects/angular-ecmascript-intl/src/lib/relative-time/relative-time.pipe.ts +++ b/projects/angular-ecmascript-intl/src/lib/relative-time/relative-time.pipe.ts @@ -55,7 +55,7 @@ export class IntlRelativeTimePipe implements PipeTransform, OnDestroy { const time = new Date(value).getTime(); if (isNaN(time)) { - throw new Error(`${value} is not a valid date`); + throw new Error(`${value.toString()} is not a valid date`); } this.#destroy(); diff --git a/projects/angular-intl-demo/src/main.ts b/projects/angular-intl-demo/src/main.ts index 17a5cd4e..82a1580b 100644 --- a/projects/angular-intl-demo/src/main.ts +++ b/projects/angular-intl-demo/src/main.ts @@ -4,4 +4,6 @@ import { AppModule } from './app/app.module'; platformBrowserDynamic() .bootstrapModule(AppModule) - .catch((err) => console.error(err)); + .catch((err) => { + console.error(err); + });