Skip to content

Commit

Permalink
[ci:force] - Fixed lint
Browse files Browse the repository at this point in the history
  • Loading branch information
VitoAlbano committed Nov 4, 2024
1 parent 2335d43 commit cd72f40
Show file tree
Hide file tree
Showing 301 changed files with 3,769 additions and 4,836 deletions.
2 changes: 1 addition & 1 deletion lib/content-services/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"createDefaultProgram": true
},
"rules": {
"jsdoc/newline-after-description": "warn",
"jsdoc/tag-lines": [1],
"@typescript-eslint/naming-convention": "warn",
"@typescript-eslint/consistent-type-assertions": "warn",
"@typescript-eslint/prefer-for-of": "warn",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ export class AgentService {

/**
* Gets all agents from cache. If cache is empty, fetches agents from backend.
*
* @returns Agent[] list containing agents.
*/
getAgents(): Observable<Agent[]> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,17 @@ import { AlfrescoApiService } from '../services/alfresco-api.service';

@Injectable()
export class AlfrescoApiNoAuthService extends AlfrescoApiService {
constructor(
storage: StorageService,
appConfig: AppConfigService,
private readonly adfHttpClient: AdfHttpClient
) {
constructor(storage: StorageService, appConfig: AppConfigService, private readonly adfHttpClient: AdfHttpClient) {
super(appConfig, storage);
}

override createInstance(config: AlfrescoApiConfig) {
return new AlfrescoApi({
...config,
oauthInit: false
}, this.adfHttpClient);
return new AlfrescoApi(
{
...config,
oauthInit: false
},
this.adfHttpClient
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@
import { AlfrescoApiConfig } from '@alfresco/js-api';
import { Injectable } from '@angular/core';
import { AppConfigService, AppConfigValues, StorageService } from '@alfresco/adf-core';
import { AlfrescoApiService } from '../services/alfresco-api.service';
import { AlfrescoApiService } from '../services/alfresco-api.service';

/**
* Create a factory to resolve an api service instance
*
* @param angularAlfrescoApiService loader service
* @returns factory function
*/
Expand All @@ -34,10 +33,11 @@ export function createAlfrescoApiInstance(angularAlfrescoApiService: AlfrescoApi
providedIn: 'root'
})
export class AlfrescoApiLoaderService {
constructor(private readonly appConfig: AppConfigService,
private readonly apiService: AlfrescoApiService,
private storageService: StorageService) {
}
constructor(
private readonly appConfig: AppConfigService,
private readonly apiService: AlfrescoApiService,
private storageService: StorageService
) {}

async init(): Promise<any> {
await this.appConfig.load();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/

import { Injectable } from '@angular/core';
import { AlfrescoApiService } from '../../services/alfresco-api.service';
import { AlfrescoApiService } from '../../services/alfresco-api.service';
import { AppConfigService } from '@alfresco/adf-core';
import { from, Observable, of, zip } from 'rxjs';
import { catchError, map } from 'rxjs/operators';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ import { TagService } from '../../tag/services/tag.service';
providedIn: 'root'
})
export class NodeAspectService {

constructor(private nodesApiService: NodesApiService,
private dialogAspectListService: DialogAspectListService,
private cardViewContentUpdateService: CardViewContentUpdateService,
private tagService: TagService) {
}
constructor(
private nodesApiService: NodesApiService,
private dialogAspectListService: DialogAspectListService,
private cardViewContentUpdateService: CardViewContentUpdateService,
private tagService: TagService
) {}

updateNodeAspects(nodeId: string, selectorAutoFocusedOnClose?: string) {
this.dialogAspectListService.openAspectListDialog(nodeId, selectorAutoFocusedOnClose).subscribe((aspectList) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import { ContentAuthLoaderService } from './content-auth-loader.service';

/**
* Create a content auth factory
*
* @param authLoaderService service dependency
* @returns factory function
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ describe('ContentAuthLoaderService', () => {
basicAlfrescoAuthService = TestBed.inject(BasicAlfrescoAuthService);
});


it('should require Alf ticket on login if OAuth and provider is ALL or ECM', fakeAsync(() => {
spyOn(authService, 'isOauth').and.returnValue(true);
spyOn(authService, 'isALLProvider').and.returnValue(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,15 @@ import { take } from 'rxjs/operators';

@Injectable()
export class ContentAuthLoaderService {

constructor(
private readonly basicAlfrescoAuthService: BasicAlfrescoAuthService,
private readonly authService: AuthenticationService
) {
}
constructor(private readonly basicAlfrescoAuthService: BasicAlfrescoAuthService, private readonly authService: AuthenticationService) {}

init(): void {
this.authService.onLogin
.pipe(take(1))
.subscribe({
next: async () => {
if (this.authService.isOauth() && (this.authService.isALLProvider() || this.authService.isECMProvider())) {
await this.basicAlfrescoAuthService.requireAlfTicket();
}
this.authService.onLogin.pipe(take(1)).subscribe({
next: async () => {
if (this.authService.isOauth() && (this.authService.isALLProvider() || this.authService.isECMProvider())) {
await this.basicAlfrescoAuthService.requireAlfTicket();
}
});
}
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ describe('Breadcrumb', () => {
});
let documentListComponent: DocumentListComponent;

const getBreadcrumbActionText = (): string =>
fixture.debugElement.nativeElement.querySelector('.adf-breadcrumb-item-current').textContent.trim();
const getBreadcrumbActionText = (): string => fixture.debugElement.nativeElement.querySelector('.adf-breadcrumb-item-current').textContent.trim();

beforeEach(() => {
TestBed.configureTestingModule({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ export class DropdownBreadcrumbComponent extends BreadcrumbComponent implements

/**
* Check if route has more than one element (means: we are not in the root directory)
*
* @returns `true` if there are previous nodes, otherwise `false`
*/
hasPreviousNodes(): boolean {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ describe('CategoriesManagementComponent', () => {

/**
* Get no categories message
*
* @returns message text
*/
function getNoCategoriesMessage(): string {
Expand All @@ -77,7 +76,6 @@ describe('CategoriesManagementComponent', () => {

/**
* Get assigned categories list
*
* @returns list of native elements
*/
function getAssignedCategoriesList(): HTMLSpanElement[] {
Expand All @@ -86,7 +84,6 @@ describe('CategoriesManagementComponent', () => {

/**
* Get the exiting categories list
*
* @returns list of material option element
*/
function getExistingCategoriesList(): HTMLElement[] {
Expand All @@ -95,7 +92,6 @@ describe('CategoriesManagementComponent', () => {

/**
* Create new category
*
* @param name name of the category
* @param addUsingEnter use Enter key
* @param typingTimeout typing timeout in milliseconds (default 300)
Expand All @@ -115,7 +111,6 @@ describe('CategoriesManagementComponent', () => {

/**
* Get first error
*
* @returns error text
*/
function getFirstError(): string {
Expand All @@ -124,7 +119,6 @@ describe('CategoriesManagementComponent', () => {

/**
* Get selection list
*
* @returns material selection list
*/
function getSelectionList(): MatList {
Expand All @@ -133,7 +127,6 @@ describe('CategoriesManagementComponent', () => {

/**
* Get remove category buttons
*
* @returns list of native elements
*/
function getRemoveCategoryButtons(): HTMLButtonElement[] {
Expand All @@ -144,7 +137,6 @@ describe('CategoriesManagementComponent', () => {

/**
* Get category control input
*
* @returns native input element
*/
function getCategoryControlInput(): HTMLInputElement {
Expand All @@ -153,7 +145,6 @@ describe('CategoriesManagementComponent', () => {

/**
* Get create category label
*
* @returns native element
*/
function getCreateCategoryLabel(): HTMLSpanElement {
Expand All @@ -162,7 +153,6 @@ describe('CategoriesManagementComponent', () => {

/**
* Type new category
*
* @param name name of the category
* @param timeout typing timeout in milliseconds (default 300)
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ export class CategoriesManagementComponent implements OnInit, OnDestroy {
/**
* Decides if categoryNameControl should be visible. Sets also existing categories panel visibility
* and scrolls control into view when visible.
*
* @param categoryNameControlVisible control visibility.
*/
@Input()
Expand Down Expand Up @@ -245,7 +244,6 @@ export class CategoriesManagementComponent implements OnInit, OnDestroy {

/**
* Adds existing category to categories list and removes it from existing categories list.
*
* @param category - selection list change containing selected category
*/
addCategoryToAssign(category: Category) {
Expand All @@ -260,7 +258,6 @@ export class CategoriesManagementComponent implements OnInit, OnDestroy {

/**
* Removes the category from categories list and adds it to existing categories list in ASSIGN mode.
*
* @param category - category to remove
*/
removeCategory(category: Category) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
import { Injectable } from '@angular/core';
import {
CategoryEntry,
CategoryPaging, Pagination, PathInfo, ResultNode,
CategoryPaging,
Pagination,
PathInfo,
ResultNode,
ResultSetPaging,
ResultSetPagingList,
ResultSetRowEntry
Expand All @@ -27,7 +30,6 @@ import { Observable, of } from 'rxjs';

@Injectable({ providedIn: 'root' })
export class CategoryServiceMock {

public getSubcategories(parentNodeId: string, skipCount?: number, maxItems?: number): Observable<CategoryPaging> {
return parentNodeId ? of(this.getChildrenLevelResponse(skipCount, maxItems)) : of(this.getRootLevelResponse(skipCount, maxItems));
}
Expand Down Expand Up @@ -66,12 +68,12 @@ export class CategoryServiceMock {
}

private getRootLevelResponse(skipCount?: number, maxItems?: number): CategoryPaging {
const rootCategoryEntry: CategoryEntry = {entry: {id: 'testId', name: 'testNode', parentId: '-root-', hasChildren: true}};
return {list: {pagination: {skipCount, maxItems, hasMoreItems: false}, entries: [rootCategoryEntry]}};
const rootCategoryEntry: CategoryEntry = { entry: { id: 'testId', name: 'testNode', parentId: '-root-', hasChildren: true } };
return { list: { pagination: { skipCount, maxItems, hasMoreItems: false }, entries: [rootCategoryEntry] } };
}

private getChildrenLevelResponse(skipCount?: number, maxItems?: number): CategoryPaging {
const childCategoryEntry: CategoryEntry = {entry: {id: 'childId', name: 'childNode', parentId: 'testId', hasChildren: false}};
return {list: {pagination: {skipCount, maxItems, hasMoreItems: true}, entries: [childCategoryEntry]}};
const childCategoryEntry: CategoryEntry = { entry: { id: 'childId', name: 'childNode', parentId: 'testId', hasChildren: false } };
return { list: { pagination: { skipCount, maxItems, hasMoreItems: true }, entries: [childCategoryEntry] } };
}
}
Loading

0 comments on commit cd72f40

Please sign in to comment.