From 5eba24b0daefc2fa0a32f6d2f32bbd4b84b86ee4 Mon Sep 17 00:00:00 2001 From: Dan Percic Date: Mon, 20 Jun 2022 21:49:13 +0300 Subject: [PATCH] try fix v4 --- .eslintrc.json | 42 ++++++++++++++----- src/lib/dialog/confirmation-dialog.service.ts | 5 ++- .../editable-input.component.ts | 2 +- src/lib/listing/services/entities.service.ts | 4 +- src/lib/listing/table/table.component.ts | 2 +- .../confirmation-dialog.component.ts | 2 +- 6 files changed, 40 insertions(+), 17 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index c24a018..b5052cc 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,15 +1,23 @@ { - "extends": ["../../.eslintrc.json"], + "extends": [ + "../../.eslintrc.json" + ], "env": { "browser": true, "node": true }, - "ignorePatterns": ["!**/*"], + "ignorePatterns": [ + "!**/*" + ], "overrides": [ { - "files": ["**/*.ts"], + "files": [ + "**/*.ts" + ], "parserOptions": { - "project": ["tsconfig.json"] + "project": [ + "tsconfig.json" + ] }, "rules": { "@angular-eslint/directive-selector": [ @@ -41,25 +49,39 @@ "error", { "selector": "memberLike", - "modifiers": ["private"], - "format": ["camelCase"], + "modifiers": [ + "private" + ], + "format": [ + "camelCase" + ], "leadingUnderscore": "allow" }, { "selector": "memberLike", - "modifiers": ["protected"], - "format": ["camelCase"], + "modifiers": [ + "protected" + ], + "format": [ + "camelCase" + ], "leadingUnderscore": "allow" }, { "selector": "memberLike", - "modifiers": ["private"], - "format": ["UPPER_CASE", "camelCase"], + "modifiers": [ + "private" + ], + "format": [ + "UPPER_CASE", + "camelCase" + ], "leadingUnderscore": "allow" } ], "no-underscore-dangle": "off", "no-param-reassign": "error", + "no-dupe-class-members": "off", "consistent-return": "off", "@typescript-eslint/restrict-template-expressions": "off", "@typescript-eslint/lines-between-class-members": "off" diff --git a/src/lib/dialog/confirmation-dialog.service.ts b/src/lib/dialog/confirmation-dialog.service.ts index 16f8a1e..2664376 100644 --- a/src/lib/dialog/confirmation-dialog.service.ts +++ b/src/lib/dialog/confirmation-dialog.service.ts @@ -17,11 +17,12 @@ export class ConfirmationDialogService extends DialogService { }, }; - constructor(protected readonly _dialog: MatDialog) { + constructor(protected override readonly _dialog: MatDialog) { super(_dialog); } - openDialog(data?): MatDialogRef { + // @ts-ignore + override openDialog(data?: { disableConfirm: boolean; [key: string]: unknown }): MatDialogRef { return super.openDialog( 'confirm', null, diff --git a/src/lib/inputs/editable-input/editable-input.component.ts b/src/lib/inputs/editable-input/editable-input.component.ts index f544d0e..cdcda8b 100644 --- a/src/lib/inputs/editable-input/editable-input.component.ts +++ b/src/lib/inputs/editable-input/editable-input.component.ts @@ -33,7 +33,7 @@ export class EditableInputComponent implements OnChanges { } ngOnChanges(changes: SimpleChanges): void { - if (changes.value) { + if (changes['value']) { this.editing = false; } } diff --git a/src/lib/listing/services/entities.service.ts b/src/lib/listing/services/entities.service.ts index 06a590a..7af6064 100644 --- a/src/lib/listing/services/entities.service.ts +++ b/src/lib/listing/services/entities.service.ts @@ -26,9 +26,9 @@ export class EntitiesService extends GenericService< private readonly _all$ = new BehaviorSubject([]); constructor( - protected readonly _injector: Injector, + protected override readonly _injector: Injector, @Optional() @Inject(ENTITY_CLASS) private readonly _entityClass: new (entityInterface: I, ...args: unknown[]) => E, - @Optional() @Inject(ENTITY_PATH) protected readonly _defaultModelPath = '', + @Optional() @Inject(ENTITY_PATH) protected override readonly _defaultModelPath = '', ) { super(_injector, _defaultModelPath); this.all$ = this._all$.asObservable().pipe(shareDistinctLast()); diff --git a/src/lib/listing/table/table.component.ts b/src/lib/listing/table/table.component.ts index 74096d0..6997e91 100644 --- a/src/lib/listing/table/table.component.ts +++ b/src/lib/listing/table/table.component.ts @@ -66,7 +66,7 @@ export class TableComponent extends AutoUnsubscribe impleme } ngOnChanges(changes: SimpleChanges): void { - if (changes.tableColumnConfigs) { + if (changes['tableColumnConfigs']) { this._setStyles(); } } diff --git a/src/lib/misc/confirmation-dialog/confirmation-dialog.component.ts b/src/lib/misc/confirmation-dialog/confirmation-dialog.component.ts index a8b92e9..4225e44 100644 --- a/src/lib/misc/confirmation-dialog/confirmation-dialog.component.ts +++ b/src/lib/misc/confirmation-dialog/confirmation-dialog.component.ts @@ -35,7 +35,7 @@ export class ConfirmationDialogInput { disableConfirm?: boolean; denyText?: string; translateParams?: Record; - checkboxes: CheckBox[]; + checkboxes?: CheckBox[]; toastMessage?: string; constructor(options?: ConfirmationDialogInput) {