Skip to content

Commit

Permalink
Fixed linting for packages
Browse files Browse the repository at this point in the history
  • Loading branch information
VitoAlbano committed Jun 10, 2024
1 parent 8204a09 commit 7a5f959
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,10 @@
* limitations under the License.
*/

import { AlfrescoApiService } from '@alfresco/adf-core';
import { AlfrescoApiService, ConfirmDialogComponent } from '@alfresco/adf-core';
import { Component, Input, OnChanges, ViewEncapsulation, EventEmitter, Output, OnInit, OnDestroy, ViewChild } from '@angular/core';
import { VersionsApi, Node, VersionEntry, NodesApi, NodeEntry, ContentApi, ContentPagingQuery } from '@alfresco/js-api';
import { MatDialog } from '@angular/material/dialog';
import { ConfirmDialogComponent } from '@alfresco/adf-core';
import { ContentVersionService } from './content-version.service';
import { ContentService } from '../common';
import { InfiniteScrollDatasource } from '../infinite-scroll-datasource';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ describe('CardViewTextItemComponent', () => {

const expectedErrorMessages = [{ message: 'Something went wrong' } as CardViewItemValidator];

const getTextField = (key: string): HTMLInputElement => fixture.debugElement.query(By.css(`[data-automation-id="card-textitem-value-${key}"]`)).nativeElement;
const getTextField = (key: string): HTMLInputElement =>
fixture.debugElement.query(By.css(`[data-automation-id="card-textitem-value-${key}"]`)).nativeElement;

const updateTextField = (key: string, value) => {
const editInput = getTextField(key);
Expand All @@ -56,9 +57,8 @@ describe('CardViewTextItemComponent', () => {
return textItemInput.value;
};

const getErrorElements = (key: string, includeItems = false): DebugElement[] => {
return fixture.debugElement.queryAll(By.css(`[data-automation-id="card-textitem-error-${key}"]${includeItems ? ' li' : ''}`));
};
const getErrorElements = (key: string, includeItems = false): DebugElement[] =>
fixture.debugElement.queryAll(By.css(`[data-automation-id="card-textitem-error-${key}"]${includeItems ? ' li' : ''}`));

const getTextFieldError = (key: string): string => {
const textItemInputErrors = getErrorElements(key, true);
Expand Down Expand Up @@ -327,7 +327,7 @@ describe('CardViewTextItemComponent', () => {
multivalued: true
};

component.editable =true;
component.editable = true;
component.property = new CardViewTextItemModel(cardViewTextItemObject);
component.displayLabelForChips = false;
component.ngOnChanges({ property: new SimpleChange(null, null, true) });
Expand Down
11 changes: 2 additions & 9 deletions lib/core/src/lib/dialogs/confirm-dialog/confirm.dialog.module.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
* @license
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
* Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -24,14 +24,7 @@ import { MatDialogModule } from '@angular/material/dialog';
import { MatButtonModule } from '@angular/material/button';
@NgModule({
declarations: [ConfirmDialogComponent],
imports: [
CommonModule,
FormsModule,
ReactiveFormsModule,
TranslateModule,
MatDialogModule,
MatButtonModule
],
imports: [CommonModule, FormsModule, ReactiveFormsModule, TranslateModule, MatDialogModule, MatButtonModule],
exports: [ConfirmDialogComponent]
})
export class ConfirmDialogModule {}
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe('LayoutContainerComponent', () => {

const checkContentAnimationState = (value: string, marginProperty: string, marginValue: number) => {
expect(layoutContainerComponent.contentAnimationState).toEqual({
value: value,
value,
params: { [marginProperty]: marginValue }
});
};
Expand Down
2 changes: 1 addition & 1 deletion lib/core/src/lib/pipes/date-time.pipe.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { DateTimePipe } from './date-time.pipe';
import { addMinutes, isValid } from 'date-fns';

describe('DateTimePipe', () => {
let pipe = new DateTimePipe();
const pipe = new DateTimePipe();

it('should transform string input to date format', () => {
const value = '2023-08-24 12:00:00';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ import {
FormModel,
ContentLinkModel,
UploadWidgetContentLinkModel,
FormEvent
FormEvent,
ConfirmDialogComponent
} from '@alfresco/adf-core';
import { FormCloudService } from '../services/form-cloud.service';
import { TaskVariableCloud } from '../models/task-variable-cloud.model';
import { TaskDetailsCloudModel } from '../../task/start-task/models/task-details-cloud.model';
import { MatDialog } from '@angular/material/dialog';
import { ConfirmDialogComponent } from '@alfresco/adf-core';
import { v4 as uuidGeneration } from 'uuid';
import { FormCloudDisplayMode, FormCloudDisplayModeConfiguration } from '../../services/form-fields.interfaces';
import { DisplayModeService } from '../public-api';
Expand Down

0 comments on commit 7a5f959

Please sign in to comment.