From 27b0ba897a06f421cec5075ba8c44d6240488b95 Mon Sep 17 00:00:00 2001 From: Eugenio Romano Date: Thu, 29 Nov 2018 15:04:12 +0000 Subject: [PATCH] [lint-refactor] simplify tslint and unify main tslint extension in sub folders (#4032) * simplify tslint and unify main tslint extension in sub folders * remove autofix * fix lint extension and process cloud --- .../app-layout/app-layout.component.ts | 16 +- .../datatable/datatable.component.ts | 6 +- .../file-view/file-view.component.ts | 2 +- .../app/components/files/files.component.ts | 12 +- .../components/form/form-list.component.ts | 7 +- .../src/app/components/form/form.component.ts | 2 +- .../notifications/notifications.component.ts | 2 +- .../process-list-demo.component.ts | 2 +- .../form-node-viewer.component.ts | 2 +- .../process-service/form-viewer.component.ts | 3 +- .../process-attachments.component.ts | 4 +- .../process-service.component.ts | 16 +- .../process-service/show-diagram.component.ts | 3 +- .../task-attachments.component.ts | 15 +- .../search/search-result.component.ts | 6 +- .../shared-link-view.component.ts | 2 +- .../task-list-cloud-demo.component.ts | 4 +- .../task-list-demo.component.ts | 2 +- .../components/theme-picker/theme-picker.ts | 2 +- .../components/trashcan/trashcan.component.ts | 2 +- .../src/app/extensions/extension.service.ts | 4 +- .../app/services/auth-bearer.interceptor.ts | 12 +- .../app/services/in-memory-form.service.ts | 8 +- demo-shell/src/app/services/index.ts | 2 +- demo-shell/tslint.json | 170 +------------- e2e/actions/APS-cloud/apiservice.ts | 2 +- .../share-file/unshare_file.e2e.ts | 4 +- .../search/components/search-checkList.ts | 4 +- e2e/pages/adf/tagPage.ts | 4 +- .../dynamic-component/dynamic.component.ts | 2 +- .../dynamic-tab/dynamic-tab.component.ts | 28 +-- .../src/lib/config/action.extensions.ts | 2 +- .../src/lib/config/extension-element.ts | 2 +- .../src/lib/config/extension-utils.ts | 2 +- .../src/lib/config/extension.config.ts | 2 +- .../src/lib/config/navbar.extensions.ts | 2 +- .../src/lib/config/permission.extensions.ts | 2 +- .../src/lib/config/routing.extensions.ts | 2 +- .../src/lib/config/rule.extensions.ts | 2 +- .../src/lib/config/sidebar.extensions.ts | 2 +- .../src/lib/config/viewer.extensions.ts | 2 +- .../lib/evaluators/core.evaluators.spec.ts | 2 +- .../src/lib/evaluators/core.evaluators.ts | 2 +- lib/extensions/src/lib/extensions.module.ts | 2 +- .../lib/services/extension-loader.service.ts | 2 +- .../lib/services/extension.service.spec.ts | 2 +- .../src/lib/services/extension.service.ts | 2 +- .../src/lib/store/states/navigation.state.ts | 2 +- .../src/lib/store/states/profile.state.ts | 2 +- .../src/lib/store/states/repository.state.ts | 2 +- .../src/lib/store/states/selection.state.ts | 2 +- lib/extensions/src/public_api.ts | 2 +- lib/extensions/src/test.ts | 17 ++ .../app-list-cloud.module.spec.ts | 1 + .../process-list-cloud.component.ts | 1 + .../process-list-cloud.module.spec.ts | 1 + lib/process-services-cloud/src/test.ts | 1 + lib/tslint.json | 222 +----------------- package.json | 2 +- tslint.json | 1 + 60 files changed, 141 insertions(+), 497 deletions(-) diff --git a/demo-shell/src/app/components/app-layout/app-layout.component.ts b/demo-shell/src/app/components/app-layout/app-layout.component.ts index 704fc1fc80..4aab9280e4 100644 --- a/demo-shell/src/app/components/app-layout/app-layout.component.ts +++ b/demo-shell/src/app/components/app-layout/app-layout.component.ts @@ -87,14 +87,14 @@ export class AppLayoutComponent implements OnInit { this.expandedSidenav = expand; } - this.headerService.hideMenu.subscribe(show => this.showMenu = show); - this.headerService.color.subscribe(color => this.color = color); - this.headerService.title.subscribe(title => this.title = title); - this.headerService.logo.subscribe(path => this.logo = path); - this.headerService.redirectUrl.subscribe(redirectUrl => this.redirectUrl = redirectUrl); - this.headerService.tooltip.subscribe(tooltip => this.tooltip = tooltip); - this.headerService.position.subscribe(position => this.position = position); - this.headerService.hideSidenav.subscribe(hideSidenav => this.hideSidenav = hideSidenav); + this.headerService.hideMenu.subscribe((show) => this.showMenu = show); + this.headerService.color.subscribe((color) => this.color = color); + this.headerService.title.subscribe((title) => this.title = title); + this.headerService.logo.subscribe((path) => this.logo = path); + this.headerService.redirectUrl.subscribe((redirectUrl) => this.redirectUrl = redirectUrl); + this.headerService.tooltip.subscribe((tooltip) => this.tooltip = tooltip); + this.headerService.position.subscribe((position) => this.position = position); + this.headerService.hideSidenav.subscribe((hideSidenav) => this.hideSidenav = hideSidenav); } constructor( diff --git a/demo-shell/src/app/components/datatable/datatable.component.ts b/demo-shell/src/app/components/datatable/datatable.component.ts index b857396b39..29f7d55369 100644 --- a/demo-shell/src/app/components/datatable/datatable.component.ts +++ b/demo-shell/src/app/components/datatable/datatable.component.ts @@ -29,7 +29,7 @@ export class FilteredDataAdapter extends ObjectDataTableAdapter { const filter = (this.filterValue || '').trim().toLowerCase(); if (this.filterKey && filter) { - rows = rows.filter(row => { + rows = rows.filter((row) => { const value = row.getValue(this.filterKey); if (value !== undefined && value !== null) { const stringValue: string = value.toString().trim().toLowerCase(); @@ -162,7 +162,7 @@ export class DataTableComponent { icon: this._imageUrl } ]; - const rows = objects.map(obj => new ObjectDataRow(obj)); + const rows = objects.map((obj) => new ObjectDataRow(obj)); this.data.setRows(rows); } @@ -171,7 +171,7 @@ export class DataTableComponent { { type: 'text', key: 'id', title: 'Id', sortable: true }, { type: 'text', key: 'name', title: 'Name', sortable: true, cssClass: 'full-width name-column' } ]; - const columns = schema.map(col => new ObjectDataColumn(col)); + const columns = schema.map((col) => new ObjectDataColumn(col)); this.data.setColumns(columns); } diff --git a/demo-shell/src/app/components/file-view/file-view.component.ts b/demo-shell/src/app/components/file-view/file-view.component.ts index febf3cde7f..9871bcdeb7 100644 --- a/demo-shell/src/app/components/file-view/file-view.component.ts +++ b/demo-shell/src/app/components/file-view/file-view.component.ts @@ -62,7 +62,7 @@ export class FileViewComponent implements OnInit { } ngOnInit() { - this.route.params.subscribe(params => { + this.route.params.subscribe((params) => { const id = params.nodeId; if (id) { this.nodeApiService.getNode(id).subscribe( diff --git a/demo-shell/src/app/components/files/files.component.ts b/demo-shell/src/app/components/files/files.component.ts index f23b0afbd0..19b7c71fff 100644 --- a/demo-shell/src/app/components/files/files.component.ts +++ b/demo-shell/src/app/components/files/files.component.ts @@ -256,11 +256,11 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy { // this.disableDragArea = false; this.uploadService.fileUploadComplete.asObservable() .pipe(debounceTime(300)) - .subscribe(value => this.onFileUploadEvent(value)); + .subscribe((value) => this.onFileUploadEvent(value)); this.uploadService.fileUploadDeleted.subscribe((value) => this.onFileUploadEvent(value)); - this.contentService.folderCreated.subscribe(value => this.onFolderCreated(value)); - this.onCreateFolder = this.contentService.folderCreate.subscribe(value => this.onFolderAction(value)); - this.onEditFolder = this.contentService.folderEdit.subscribe(value => this.onFolderAction(value)); + this.contentService.folderCreated.subscribe((value) => this.onFolderCreated(value)); + this.onCreateFolder = this.contentService.folderCreate.subscribe((value) => this.onFolderAction(value)); + this.onEditFolder = this.contentService.folderEdit.subscribe((value) => this.onFolderAction(value)); // this.permissionsStyle.push(new PermissionStyleModel('document-list__create', PermissionsEnum.CREATE)); // this.permissionsStyle.push(new PermissionStyleModel('document-list__disable', PermissionsEnum.NOT_CREATE, false, true)); @@ -483,7 +483,7 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy { panelClass: 'adf-version-manager-dialog' }); - dialogRef.afterClosed().subscribe(selectedProcess => { + dialogRef.afterClosed().subscribe((selectedProcess) => { this.processId = selectedProcess.id; }); @@ -549,7 +549,7 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy { minWidth: '250px' }); - dialogRef.afterClosed().subscribe(result => { + dialogRef.afterClosed().subscribe((result) => { if (result === true) { event.resumeUpload(); } diff --git a/demo-shell/src/app/components/form/form-list.component.ts b/demo-shell/src/app/components/form/form-list.component.ts index 04316eb0bf..3a6c4243d2 100644 --- a/demo-shell/src/app/components/form/form-list.component.ts +++ b/demo-shell/src/app/components/form/form-list.component.ts @@ -17,6 +17,7 @@ import { Component, ViewChild } from '@angular/core'; import { FormComponent, FormModel, FormService, LogService } from '@alfresco/adf-core'; +import { FormOutcomeEvent } from '../../../../../lib/core/form/components/widgets/core'; @Component({ selector: 'app-form-list', @@ -40,9 +41,9 @@ export class FormListComponent { constructor(private formService: FormService, private logService: LogService) { // Prevent default outcome actions - formService.executeOutcome.subscribe(e => { - e.preventDefault(); - this.logService.log(e.outcome); + formService.executeOutcome.subscribe((formOutcomeEvent: FormOutcomeEvent) => { + formOutcomeEvent.preventDefault(); + this.logService.log(formOutcomeEvent.outcome); }); } diff --git a/demo-shell/src/app/components/form/form.component.ts b/demo-shell/src/app/components/form/form.component.ts index db88e2f942..472bddfb54 100644 --- a/demo-shell/src/app/components/form/form.component.ts +++ b/demo-shell/src/app/components/form/form.component.ts @@ -68,7 +68,7 @@ export class FormComponent implements OnInit, OnDestroy { } ngOnDestroy() { - this.subscriptions.forEach(subscription => subscription.unsubscribe()); + this.subscriptions.forEach((subscription) => subscription.unsubscribe()); this.subscriptions = []; } diff --git a/demo-shell/src/app/components/notifications/notifications.component.ts b/demo-shell/src/app/components/notifications/notifications.component.ts index 218f3ddc8b..cdf4bf3790 100644 --- a/demo-shell/src/app/components/notifications/notifications.component.ts +++ b/demo-shell/src/app/components/notifications/notifications.component.ts @@ -69,7 +69,7 @@ export class NotificationsComponent implements OnInit { }); this.configForm.valueChanges - .subscribe(configFormValues => + .subscribe((configFormValues) => this.setSnackBarConfig(configFormValues) ); diff --git a/demo-shell/src/app/components/process-list-demo/process-list-demo.component.ts b/demo-shell/src/app/components/process-list-demo/process-list-demo.component.ts index 7cc258d54a..ae271e5d83 100644 --- a/demo-shell/src/app/components/process-list-demo/process-list-demo.component.ts +++ b/demo-shell/src/app/components/process-list-demo/process-list-demo.component.ts @@ -87,7 +87,7 @@ export class ProcessListDemoComponent implements OnInit { .pipe( debounceTime(500) ) - .subscribe(processFilter => { + .subscribe((processFilter) => { if (this.isFormValid()) { this.filterProcesses(processFilter); } diff --git a/demo-shell/src/app/components/process-service/form-node-viewer.component.ts b/demo-shell/src/app/components/process-service/form-node-viewer.component.ts index 701fcd89ff..5ce94468c4 100644 --- a/demo-shell/src/app/components/process-service/form-node-viewer.component.ts +++ b/demo-shell/src/app/components/process-service/form-node-viewer.component.ts @@ -34,7 +34,7 @@ export class FormNodeViewerComponent implements OnInit, OnDestroy { } ngOnInit() { - this.sub = this.route.params.subscribe(params => { + this.sub = this.route.params.subscribe((params) => { this.nodeId = params['id']; }); } diff --git a/demo-shell/src/app/components/process-service/form-viewer.component.ts b/demo-shell/src/app/components/process-service/form-viewer.component.ts index 15d9fe1471..8ef4c0f2e0 100644 --- a/demo-shell/src/app/components/process-service/form-viewer.component.ts +++ b/demo-shell/src/app/components/process-service/form-viewer.component.ts @@ -18,6 +18,7 @@ import { Component, OnDestroy, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { Subscription } from 'rxjs'; +import { Params } from '@angular/router/src/shared'; @Component({ selector: 'app-form-viewer', @@ -34,7 +35,7 @@ export class FormViewerComponent implements OnInit, OnDestroy { } ngOnInit() { - this.sub = this.route.params.subscribe(params => { + this.sub = this.route.params.subscribe((params: Params) => { this.taskId = params['id']; }); } diff --git a/demo-shell/src/app/components/process-service/process-attachments.component.ts b/demo-shell/src/app/components/process-service/process-attachments.component.ts index 2ecc4306f2..f8798a808a 100644 --- a/demo-shell/src/app/components/process-service/process-attachments.component.ts +++ b/demo-shell/src/app/components/process-service/process-attachments.component.ts @@ -62,7 +62,7 @@ export class ProcessAttachmentsComponent implements OnInit, OnChanges, OnDestroy ngOnInit() { this.subscriptions.push( this.uploadService.fileUploadComplete.subscribe( - value => this.onFileUploadComplete(value.data) + (value) => this.onFileUploadComplete(value.data) ) ); } @@ -77,7 +77,7 @@ export class ProcessAttachmentsComponent implements OnInit, OnChanges, OnDestroy } ngOnDestroy() { - this.subscriptions.forEach(subscription => subscription.unsubscribe()); + this.subscriptions.forEach((subscription) => subscription.unsubscribe()); this.subscriptions = []; } diff --git a/demo-shell/src/app/components/process-service/process-service.component.ts b/demo-shell/src/app/components/process-service/process-service.component.ts index 16166a09d8..12d4cf205d 100644 --- a/demo-shell/src/app/components/process-service/process-service.component.ts +++ b/demo-shell/src/app/components/process-service/process-service.component.ts @@ -185,11 +185,11 @@ export class ProcessServiceComponent implements AfterViewInit, OnDestroy, OnInit formRenderingService.setComponentTypeResolver('custom_stencil_01', () => CustomStencil01, true); this.subscriptions.push( - formService.formLoaded.subscribe((e: FormEvent) => { - this.logService.log(`Form loaded: ${e.form.id}`); + formService.formLoaded.subscribe((formEvent: FormEvent) => { + this.logService.log(`Form loaded: ${formEvent.form.id}`); }), - formService.formFieldValueChanged.subscribe((e: FormFieldEvent) => { - this.logService.log(`Field value changed. Form: ${e.form.id}, Field: ${e.field.id}, Value: ${e.field.value}`); + formService.formFieldValueChanged.subscribe((formFieldEvent: FormFieldEvent) => { + this.logService.log(`Field value changed. Form: ${formFieldEvent.form.id}, Field: ${formFieldEvent.field.id}, Value: ${formFieldEvent.field.value}`); }), this.preferenceService.select(UserPreferenceValues.PaginationSize).subscribe((pageSize) => { this.paginationPageSize = pageSize; @@ -205,7 +205,7 @@ export class ProcessServiceComponent implements AfterViewInit, OnDestroy, OnInit } ), - formService.formContentClicked.subscribe(content => { + formService.formContentClicked.subscribe((content) => { this.showContentPreview(content); }), @@ -229,7 +229,7 @@ export class ProcessServiceComponent implements AfterViewInit, OnDestroy, OnInit } this.showProcessTab = this.activeTab === this.tabs.processes; this.showTaskTab = this.activeTab === this.tabs.tasks; - this.route.params.subscribe(params => { + this.route.params.subscribe((params) => { const applicationId = params['appId']; this.filterSelected = params['filterId'] ? { id: +params['filterId'] } : { index: 0 }; @@ -247,7 +247,7 @@ export class ProcessServiceComponent implements AfterViewInit, OnDestroy, OnInit } ngOnDestroy() { - this.subscriptions.forEach(subscription => subscription.unsubscribe()); + this.subscriptions.forEach((subscription) => subscription.unsubscribe()); this.subscriptions = []; } @@ -460,7 +460,7 @@ export class ProcessServiceComponent implements AfterViewInit, OnDestroy, OnInit } loadStencilScriptsInPageFromProcessService() { - this.apiService.getInstance().activiti.scriptFileApi.getControllers().then(response => { + this.apiService.getInstance().activiti.scriptFileApi.getControllers().then((response) => { if (response) { const stencilScript = document.createElement('script'); stencilScript.type = 'text/javascript'; diff --git a/demo-shell/src/app/components/process-service/show-diagram.component.ts b/demo-shell/src/app/components/process-service/show-diagram.component.ts index 982eb9a818..003df1aa61 100644 --- a/demo-shell/src/app/components/process-service/show-diagram.component.ts +++ b/demo-shell/src/app/components/process-service/show-diagram.component.ts @@ -17,6 +17,7 @@ import { Component } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; +import { Params } from '@angular/router/src/shared'; @Component({ selector: 'app-show-diagram', @@ -30,7 +31,7 @@ export class ShowDiagramComponent { constructor(private route: ActivatedRoute, private router: Router) { - this.route.params.subscribe(params => { + this.route.params.subscribe((params: Params) => { this.processDefinitionId = params['processDefinitionId']; this.appId = params['appId']; }); diff --git a/demo-shell/src/app/components/process-service/task-attachments.component.ts b/demo-shell/src/app/components/process-service/task-attachments.component.ts index 588a9b5498..e8ea1a0966 100644 --- a/demo-shell/src/app/components/process-service/task-attachments.component.ts +++ b/demo-shell/src/app/components/process-service/task-attachments.component.ts @@ -16,10 +16,16 @@ */ import { Component, Input, OnChanges, OnInit, ViewChild, OnDestroy } from '@angular/core'; -import { TaskListService, TaskAttachmentListComponent, TaskDetailsModel, TaskUploadService } from '@alfresco/adf-process-services'; +import { + TaskListService, + TaskAttachmentListComponent, + TaskDetailsModel, + TaskUploadService +} from '@alfresco/adf-process-services'; import { UploadService, AlfrescoApiService, AppConfigService } from '@alfresco/adf-core'; import { PreviewService } from '../../services/preview.service'; import { Subscription } from 'rxjs'; +import { FileUploadCompleteEvent } from '../../../../../lib/core/events/file.event'; export function taskUploadServiceFactory(api: AlfrescoApiService, config: AppConfigService) { return new TaskUploadService(api, config); @@ -53,12 +59,13 @@ export class TaskAttachmentsComponent implements OnInit, OnChanges, OnDestroy { constructor( private uploadService: UploadService, private activitiTaskList: TaskListService, - private preview: PreviewService) {} + private preview: PreviewService) { + } ngOnInit() { this.subscriptions.push( this.uploadService.fileUploadComplete.subscribe( - value => this.onFileUploadComplete(value.data) + (fileUploadCompleteEvent: FileUploadCompleteEvent) => this.onFileUploadComplete(fileUploadCompleteEvent.data) ) ); } @@ -73,7 +80,7 @@ export class TaskAttachmentsComponent implements OnInit, OnChanges, OnDestroy { } ngOnDestroy() { - this.subscriptions.forEach(subscription => subscription.unsubscribe()); + this.subscriptions.forEach((subscription) => subscription.unsubscribe()); this.subscriptions = []; } diff --git a/demo-shell/src/app/components/search/search-result.component.ts b/demo-shell/src/app/components/search/search-result.component.ts index d8aeebc668..d1c08f7b9a 100644 --- a/demo-shell/src/app/components/search/search-result.component.ts +++ b/demo-shell/src/app/components/search/search-result.component.ts @@ -61,7 +61,7 @@ export class SearchResultComponent implements OnInit, OnDestroy { this.isLoading = true; }), - this.queryBuilder.executed.subscribe(data => { + this.queryBuilder.executed.subscribe((data) => { this.queryBuilder.paging.skipCount = 0; this.onSearchResultLoaded(data); @@ -91,13 +91,13 @@ export class SearchResultComponent implements OnInit, OnDestroy { } const fields = this.config.get('search.app:fields', ['cm:name']); - const query = fields.map(field => `${field}:"${userInput}*"`).join(' OR '); + const query = fields.map((field) => `${field}:"${userInput}*"`).join(' OR '); return query; } ngOnDestroy() { - this.subscriptions.forEach(subscription => subscription.unsubscribe()); + this.subscriptions.forEach((subscription) => subscription.unsubscribe()); this.subscriptions = []; } diff --git a/demo-shell/src/app/components/shared-link-view/shared-link-view.component.ts b/demo-shell/src/app/components/shared-link-view/shared-link-view.component.ts index 2524c0958e..de28dd87e3 100644 --- a/demo-shell/src/app/components/shared-link-view/shared-link-view.component.ts +++ b/demo-shell/src/app/components/shared-link-view/shared-link-view.component.ts @@ -33,7 +33,7 @@ export class SharedLinkViewComponent implements OnInit { constructor(private route: ActivatedRoute, private router: Router) {} ngOnInit() { - this.route.params.subscribe(params => { + this.route.params.subscribe((params) => { this.sharedLinkId = params.id; }); } diff --git a/demo-shell/src/app/components/task-list-cloud-demo/task-list-cloud-demo.component.ts b/demo-shell/src/app/components/task-list-cloud-demo/task-list-cloud-demo.component.ts index dd46adb494..d990d2d531 100644 --- a/demo-shell/src/app/components/task-list-cloud-demo/task-list-cloud-demo.component.ts +++ b/demo-shell/src/app/components/task-list-cloud-demo/task-list-cloud-demo.component.ts @@ -65,7 +65,7 @@ export class TaskListCloudDemoComponent implements OnInit { } ngOnInit() { - this.route.params.subscribe(params => { + this.route.params.subscribe((params) => { this.applicationName = params.applicationName; }); @@ -95,7 +95,7 @@ export class TaskListCloudDemoComponent implements OnInit { ); this.route.queryParams - .subscribe(params => { + .subscribe((params) => { if (params.status) { this.status = params.status; this.sort = params.sort; diff --git a/demo-shell/src/app/components/task-list-demo/task-list-demo.component.ts b/demo-shell/src/app/components/task-list-demo/task-list-demo.component.ts index 0f8e3b80ee..97c2eee038 100644 --- a/demo-shell/src/app/components/task-list-demo/task-list-demo.component.ts +++ b/demo-shell/src/app/components/task-list-demo/task-list-demo.component.ts @@ -115,7 +115,7 @@ export class TaskListDemoComponent implements OnInit { .pipe( debounceTime(500) ) - .subscribe(taskFilter => { + .subscribe((taskFilter) => { if (this.isFormValid()) { this.filterTasks(taskFilter); } diff --git a/demo-shell/src/app/components/theme-picker/theme-picker.ts b/demo-shell/src/app/components/theme-picker/theme-picker.ts index 0356ddadb3..5de5c9f20b 100644 --- a/demo-shell/src/app/components/theme-picker/theme-picker.ts +++ b/demo-shell/src/app/components/theme-picker/theme-picker.ts @@ -129,7 +129,7 @@ export class ThemePickerComponent { } private _getCurrentThemeFromHref(href: string): DocsSiteTheme { - return this.themes.find(theme => theme.href === href); + return this.themes.find((theme) => theme.href === href); } } diff --git a/demo-shell/src/app/components/trashcan/trashcan.component.ts b/demo-shell/src/app/components/trashcan/trashcan.component.ts index 7575031f40..f45ff9e96a 100644 --- a/demo-shell/src/app/components/trashcan/trashcan.component.ts +++ b/demo-shell/src/app/components/trashcan/trashcan.component.ts @@ -38,7 +38,7 @@ export class TrashcanComponent { ) { this.preference .select(UserPreferenceValues.Locale) - .subscribe(locale => { + .subscribe((locale) => { this.currentLocale = locale; }); } diff --git a/demo-shell/src/app/extensions/extension.service.ts b/demo-shell/src/app/extensions/extension.service.ts index d3335d57df..5dd0c7eb77 100644 --- a/demo-shell/src/app/extensions/extension.service.ts +++ b/demo-shell/src/app/extensions/extension.service.ts @@ -49,8 +49,8 @@ export class AppExtensionService { console.log('loaded extension config', config); const references = (config.$references || []) - .filter(entry => typeof entry === 'object') - .map(entry => entry); + .filter((entry) => typeof entry === 'object') + .map((entry) => entry); this._references.next(references); } } diff --git a/demo-shell/src/app/services/auth-bearer.interceptor.ts b/demo-shell/src/app/services/auth-bearer.interceptor.ts index 6d70f4f30a..1616d539c2 100644 --- a/demo-shell/src/app/services/auth-bearer.interceptor.ts +++ b/demo-shell/src/app/services/auth-bearer.interceptor.ts @@ -1,6 +1,6 @@ /*! * @license - * Copyright 2018 Alfresco Software, Ltd. + * Copyright 2016 Alfresco Software, Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,7 +33,7 @@ export class AuthBearerInterceptor implements HttpInterceptor { private loadExcludedUrlsRegex(): void { const excludedUrls: string[] = this.authService.getBearerExcludedUrls(); - this.excludedUrlsRegex = excludedUrls.map(urlPattern => new RegExp(urlPattern, 'gi')) || []; + this.excludedUrlsRegex = excludedUrls.map((urlPattern) => new RegExp(urlPattern, 'gi')) || []; } @@ -51,11 +51,11 @@ export class AuthBearerInterceptor implements HttpInterceptor { } const urlRequest = req.url; - const shallPass: boolean = !!this.excludedUrlsRegex.find(regex => regex.test(urlRequest)); + const shallPass: boolean = !!this.excludedUrlsRegex.find((regex) => regex.test(urlRequest)); if (shallPass) { return next.handle(req) .pipe( - catchError(error => { + catchError((error) => { return observableThrowError(error); }) ); @@ -63,11 +63,11 @@ export class AuthBearerInterceptor implements HttpInterceptor { return this.authService.addTokenToHeader(req.headers) .pipe( - mergeMap(headersWithBearer => { + mergeMap((headersWithBearer) => { const kcReq = req.clone({ headers: headersWithBearer }); return next.handle(kcReq) .pipe( - catchError(error => { + catchError((error) => { return observableThrowError(error); }) ); diff --git a/demo-shell/src/app/services/in-memory-form.service.ts b/demo-shell/src/app/services/in-memory-form.service.ts index 6dca0b3158..8138cdb10b 100644 --- a/demo-shell/src/app/services/in-memory-form.service.ts +++ b/demo-shell/src/app/services/in-memory-form.service.ts @@ -56,9 +56,9 @@ export class InMemoryFormService extends FormService { // return super.getRestFieldValues(taskId, fieldId); this.logService.log(`getRestFieldValues: ${taskId} => ${field}`); - return new Observable(observer => { + return new Observable((observer) => { const currentField = this.data.rest.fields.find( - f => f.taskId === taskId && f.fieldId === field + (f) => f.taskId === taskId && f.fieldId === field ); if ( currentField ) { const values: FormFieldOption[] = currentField.values || []; @@ -91,9 +91,9 @@ export class InMemoryFormService extends FormService { // return super.getRestFieldValuesByProcessId(processDefinitionId, fieldId); this.logService.log(`getRestFieldValuesByProcessId: ${processDefinitionId} => ${fieldId}`); - return new Observable(observer => { + return new Observable((observer) => { const field = this.data.rest.fields.find( - f => f.processId === processDefinitionId && f.fieldId === fieldId + (currentField) => currentField.processId === processDefinitionId && currentField.fieldId === fieldId ); const values: FormFieldOption[] = field.values || []; this.logService.log(values); diff --git a/demo-shell/src/app/services/index.ts b/demo-shell/src/app/services/index.ts index f8c6265617..9186ebf9c6 100644 --- a/demo-shell/src/app/services/index.ts +++ b/demo-shell/src/app/services/index.ts @@ -1,6 +1,6 @@ /*! * @license - * Copyright 2018 Alfresco Software, Ltd. + * Copyright 2016 Alfresco Software, Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/demo-shell/tslint.json b/demo-shell/tslint.json index ac4d6b382e..1e7e2af5b7 100644 --- a/demo-shell/tslint.json +++ b/demo-shell/tslint.json @@ -1,172 +1,10 @@ { - "rulesDirectory": [ - "../node_modules/codelyzer", - "../tools/tslint-rules/" - ], + "extends": "../tslint.json", "rules": { - "adf-license-banner": [ - true, - "e2e/**/*.ts", - "./license-community.txt" - ], - "align": [ - true, - "parameters", - "statements" - ], - "ban": [ - true, - "eval", - "fdescribe" - ], - "class-name": true, - "comment-format": [ - true, - "check-space" - ], - "curly": true, - "eofline": true, - "forin": true, - "indent": [ - true, - "spaces" - ], - "interface-name": false, - "jsdoc-format": true, - "label-position": true, - "max-line-length": [ - true, - 180 - ], - "member-ordering": [ - true, - { - "order": [ - "static-field", - "instance-field", - "static-method", - "instance-method" - ] - } - ], - "no-any": false, - "no-arg": true, - "no-bitwise": false, - "no-conditional-assignment": true, - "no-consecutive-blank-lines": true, - "no-console": [ - true, - "log", - "debug", - "info", - "time", - "timeEnd", - "trace" - ], - "no-construct": true, - "no-constructor-vars": false, - "no-debugger": true, - "no-duplicate-super": true, - "no-duplicate-variable": true, - "no-empty": false, - "no-eval": true, - "no-inferrable-types": false, - "no-internal-module": true, - "no-require-imports": false, - "no-shadowed-variable": true, - "no-switch-case-fall-through": true, - "no-trailing-whitespace": true, - "no-unused-expression": true, - "no-var-keyword": true, - "no-var-requires": true, - "object-literal-sort-keys": false, - "one-line": [ - true, - "check-open-brace", - "check-catch", - "check-else", - "check-whitespace" - ], - "quotemark": [ - true, - "single", - "avoid-escape" - ], - "radix": true, - "semicolon": [ - true, - "always" - ], - "switch-default": true, - "trailing-comma": [ - true, - { - "multiline": "never", - "singleline": "never" - } - ], - "triple-equals": [ - true, - "allow-null-check" - ], - "typedef": false, - "typedef-whitespace": [ - true, - { - "call-signature": "nospace", - "index-signature": "nospace", - "parameter": "nospace", - "property-declaration": "nospace", - "variable-declaration": "nospace" - } - ], - "use-strict": false, - "variable-name": [ - true, - "check-format", - "allow-leading-underscore", - "ban-keywords" - ], - "callable-types": true, - "import-spacing": true, - "interface-over-type-literal": true, - "member-access": false, - "no-empty-interface": true, - "no-string-literal": false, - "no-string-throw": true, - "prefer-const": false, - "unified-signatures": true, - "whitespace": [ - true, - "check-branch", - "check-decl", - "check-operator", - "check-separator", - "check-typecast", - "check-type", - "check-typecast", - "check-module" - ], "directive-selector": [true, "attribute", "app", "camelCase"], "component-selector": [true, "element", "app", "kebab-case"], - "naming-convention": [ - { - "type": "enumMember", - "format": "PascalCase" - } - ], - "ordered-imports": false, - "use-input-property-decorator": true, - "use-output-property-decorator": true, - "use-host-property-decorator": false, - "use-life-cycle-interface": true, - "use-pipe-transform-interface": true, - "component-class-suffix": true, - "directive-class-suffix": true, - "adf-file-name": true, - "adf-class-name": true, - "adf-prefix-name": true, - "no-input-rename": true, - "no-output-rename": true + "adf-license-banner": [true, "**/*.ts", "./license-community.txt"] } } + + diff --git a/e2e/actions/APS-cloud/apiservice.ts b/e2e/actions/APS-cloud/apiservice.ts index 6bec7287af..83410737d4 100644 --- a/e2e/actions/APS-cloud/apiservice.ts +++ b/e2e/actions/APS-cloud/apiservice.ts @@ -56,7 +56,7 @@ export class ApiService { return this.apiService.bpmClient.callCustomApi(uri, method, pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, {}) - .catch(error => { + .catch((error) => { throw (error); }); } diff --git a/e2e/content-services/share-file/unshare_file.e2e.ts b/e2e/content-services/share-file/unshare_file.e2e.ts index 30a1e9b355..00c4dcbe51 100644 --- a/e2e/content-services/share-file/unshare_file.e2e.ts +++ b/e2e/content-services/share-file/unshare_file.e2e.ts @@ -112,7 +112,7 @@ describe('Unshare file', () => { }); describe('with permission', () => { - afterAll(async done => { + afterAll(async (done) => { await uploadActions.deleteFilesOrFolder(this.alfrescoJsApi, nodeId); done(); }); @@ -160,7 +160,7 @@ describe('Unshare file', () => { }); describe('without permission', () => { - afterAll(async done => { + afterAll(async (done) => { await this.alfrescoJsApi.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword); await this.alfrescoJsApi.core.sitesApi.deleteSite(siteName, { permanent: true }); done(); diff --git a/e2e/pages/adf/content_services/search/components/search-checkList.ts b/e2e/pages/adf/content_services/search/components/search-checkList.ts index 1079fbafd1..40a00a4e29 100644 --- a/e2e/pages/adf/content_services/search/components/search-checkList.ts +++ b/e2e/pages/adf/content_services/search/components/search-checkList.ts @@ -102,7 +102,7 @@ export class SearchCheckListPage { this.clickShowMoreButtonUntilIsNotDisplayed(); } - }, err => { + }, (err) => { }); return this; } @@ -114,7 +114,7 @@ export class SearchCheckListPage { this.clickShowLessButtonUntilIsNotDisplayed(); } - }, err => { + }, (err) => { }); return this; } diff --git a/e2e/pages/adf/tagPage.ts b/e2e/pages/adf/tagPage.ts index 023d9234b5..e400a6c2c8 100644 --- a/e2e/pages/adf/tagPage.ts +++ b/e2e/pages/adf/tagPage.ts @@ -200,7 +200,7 @@ export class TagPage { this.clickShowMoreButtonUntilNotDisplayed(); } - }, err => { + }, (err) => { }); } @@ -211,7 +211,7 @@ export class TagPage { this.clickShowLessButtonUntilNotDisplayed(); } - }, err => { + }, (err) => { }); } } diff --git a/lib/extensions/src/lib/components/dynamic-component/dynamic.component.ts b/lib/extensions/src/lib/components/dynamic-component/dynamic.component.ts index 8314d30968..4dd00a488b 100644 --- a/lib/extensions/src/lib/components/dynamic-component/dynamic.component.ts +++ b/lib/extensions/src/lib/components/dynamic-component/dynamic.component.ts @@ -1,6 +1,6 @@ /*! * @license - * Copyright 2016 - 2018 Alfresco Software, Ltd. + * Copyright 2016 Alfresco Software, Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/lib/extensions/src/lib/components/dynamic-tab/dynamic-tab.component.ts b/lib/extensions/src/lib/components/dynamic-tab/dynamic-tab.component.ts index bbd3e0c9f1..cce0dcc322 100644 --- a/lib/extensions/src/lib/components/dynamic-tab/dynamic-tab.component.ts +++ b/lib/extensions/src/lib/components/dynamic-tab/dynamic-tab.component.ts @@ -1,26 +1,18 @@ /*! * @license - * Alfresco Example Content Application + * Copyright 2016 Alfresco Software, Ltd. * - * Copyright (C) 2005 - 2018 Alfresco Software Limited + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * This file is part of the Alfresco Example Content Application. - * If the software was purchased under a paid Alfresco license, the terms of - * the paid license agreement will prevail. Otherwise, the software is - * provided under the following open source license terms: + * http://www.apache.org/licenses/LICENSE-2.0 * - * The Alfresco Example Content Application is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * The Alfresco Example Content Application is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with Alfresco. If not, see . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ import { diff --git a/lib/extensions/src/lib/config/action.extensions.ts b/lib/extensions/src/lib/config/action.extensions.ts index 0906c1c240..ac62c0ea58 100644 --- a/lib/extensions/src/lib/config/action.extensions.ts +++ b/lib/extensions/src/lib/config/action.extensions.ts @@ -1,6 +1,6 @@ /*! * @license - * Copyright 2016 - 2018 Alfresco Software, Ltd. + * Copyright 2016 Alfresco Software, Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/lib/extensions/src/lib/config/extension-element.ts b/lib/extensions/src/lib/config/extension-element.ts index be0c02a63e..8bd79a4e07 100644 --- a/lib/extensions/src/lib/config/extension-element.ts +++ b/lib/extensions/src/lib/config/extension-element.ts @@ -1,6 +1,6 @@ /*! * @license - * Copyright 2016 - 2018 Alfresco Software, Ltd. + * Copyright 2016 Alfresco Software, Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/lib/extensions/src/lib/config/extension-utils.ts b/lib/extensions/src/lib/config/extension-utils.ts index 2fa36e886b..bf2acabd6e 100644 --- a/lib/extensions/src/lib/config/extension-utils.ts +++ b/lib/extensions/src/lib/config/extension-utils.ts @@ -1,6 +1,6 @@ /*! * @license - * Copyright 2016 - 2018 Alfresco Software, Ltd. + * Copyright 2016 Alfresco Software, Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/lib/extensions/src/lib/config/extension.config.ts b/lib/extensions/src/lib/config/extension.config.ts index 1e4949b24f..cd79ef5ba7 100644 --- a/lib/extensions/src/lib/config/extension.config.ts +++ b/lib/extensions/src/lib/config/extension.config.ts @@ -1,6 +1,6 @@ /*! * @license - * Copyright 2016 - 2018 Alfresco Software, Ltd. + * Copyright 2016 Alfresco Software, Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/lib/extensions/src/lib/config/navbar.extensions.ts b/lib/extensions/src/lib/config/navbar.extensions.ts index ed797da687..61b2188274 100644 --- a/lib/extensions/src/lib/config/navbar.extensions.ts +++ b/lib/extensions/src/lib/config/navbar.extensions.ts @@ -1,6 +1,6 @@ /*! * @license - * Copyright 2016 - 2018 Alfresco Software, Ltd. + * Copyright 2016 Alfresco Software, Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/lib/extensions/src/lib/config/permission.extensions.ts b/lib/extensions/src/lib/config/permission.extensions.ts index 09e6ab4e8b..108dffacbe 100644 --- a/lib/extensions/src/lib/config/permission.extensions.ts +++ b/lib/extensions/src/lib/config/permission.extensions.ts @@ -1,6 +1,6 @@ /*! * @license - * Copyright 2016 - 2018 Alfresco Software, Ltd. + * Copyright 2016 Alfresco Software, Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/lib/extensions/src/lib/config/routing.extensions.ts b/lib/extensions/src/lib/config/routing.extensions.ts index e9cff64cd5..985582c604 100644 --- a/lib/extensions/src/lib/config/routing.extensions.ts +++ b/lib/extensions/src/lib/config/routing.extensions.ts @@ -1,6 +1,6 @@ /*! * @license - * Copyright 2016 - 2018 Alfresco Software, Ltd. + * Copyright 2016 Alfresco Software, Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/lib/extensions/src/lib/config/rule.extensions.ts b/lib/extensions/src/lib/config/rule.extensions.ts index 44c8714900..3cf730c811 100644 --- a/lib/extensions/src/lib/config/rule.extensions.ts +++ b/lib/extensions/src/lib/config/rule.extensions.ts @@ -1,6 +1,6 @@ /*! * @license - * Copyright 2016 - 2018 Alfresco Software, Ltd. + * Copyright 2016 Alfresco Software, Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/lib/extensions/src/lib/config/sidebar.extensions.ts b/lib/extensions/src/lib/config/sidebar.extensions.ts index a654c3a084..7052919aeb 100644 --- a/lib/extensions/src/lib/config/sidebar.extensions.ts +++ b/lib/extensions/src/lib/config/sidebar.extensions.ts @@ -1,6 +1,6 @@ /*! * @license - * Copyright 2016 - 2018 Alfresco Software, Ltd. + * Copyright 2016 Alfresco Software, Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/lib/extensions/src/lib/config/viewer.extensions.ts b/lib/extensions/src/lib/config/viewer.extensions.ts index 22c6d95b3c..9778a1bc35 100644 --- a/lib/extensions/src/lib/config/viewer.extensions.ts +++ b/lib/extensions/src/lib/config/viewer.extensions.ts @@ -1,6 +1,6 @@ /*! * @license - * Copyright 2016 - 2018 Alfresco Software, Ltd. + * Copyright 2016 Alfresco Software, Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/lib/extensions/src/lib/evaluators/core.evaluators.spec.ts b/lib/extensions/src/lib/evaluators/core.evaluators.spec.ts index 304be9919e..ba54fee27e 100644 --- a/lib/extensions/src/lib/evaluators/core.evaluators.spec.ts +++ b/lib/extensions/src/lib/evaluators/core.evaluators.spec.ts @@ -1,6 +1,6 @@ /*! * @license - * Copyright 2016 - 2018 Alfresco Software, Ltd. + * Copyright 2016 Alfresco Software, Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/lib/extensions/src/lib/evaluators/core.evaluators.ts b/lib/extensions/src/lib/evaluators/core.evaluators.ts index d481cdee81..b2953a089c 100644 --- a/lib/extensions/src/lib/evaluators/core.evaluators.ts +++ b/lib/extensions/src/lib/evaluators/core.evaluators.ts @@ -1,6 +1,6 @@ /*! * @license - * Copyright 2016 - 2018 Alfresco Software, Ltd. + * Copyright 2016 Alfresco Software, Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/lib/extensions/src/lib/extensions.module.ts b/lib/extensions/src/lib/extensions.module.ts index 12726d3557..537ec297fe 100644 --- a/lib/extensions/src/lib/extensions.module.ts +++ b/lib/extensions/src/lib/extensions.module.ts @@ -1,6 +1,6 @@ /*! * @license - * Copyright 2016 - 2018 Alfresco Software, Ltd. + * Copyright 2016 Alfresco Software, Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/lib/extensions/src/lib/services/extension-loader.service.ts b/lib/extensions/src/lib/services/extension-loader.service.ts index be4fc57191..897125b2a9 100644 --- a/lib/extensions/src/lib/services/extension-loader.service.ts +++ b/lib/extensions/src/lib/services/extension-loader.service.ts @@ -1,6 +1,6 @@ /*! * @license - * Copyright 2016 - 2018 Alfresco Software, Ltd. + * Copyright 2016 Alfresco Software, Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/lib/extensions/src/lib/services/extension.service.spec.ts b/lib/extensions/src/lib/services/extension.service.spec.ts index 7ef7b8da8c..79f495d9fe 100644 --- a/lib/extensions/src/lib/services/extension.service.spec.ts +++ b/lib/extensions/src/lib/services/extension.service.spec.ts @@ -1,6 +1,6 @@ /*! * @license - * Copyright 2016 - 2018 Alfresco Software, Ltd. + * Copyright 2016 Alfresco Software, Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/lib/extensions/src/lib/services/extension.service.ts b/lib/extensions/src/lib/services/extension.service.ts index 9ddda90415..d968a9c9c0 100644 --- a/lib/extensions/src/lib/services/extension.service.ts +++ b/lib/extensions/src/lib/services/extension.service.ts @@ -1,6 +1,6 @@ /*! * @license - * Copyright 2016 - 2018 Alfresco Software, Ltd. + * Copyright 2016 Alfresco Software, Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/lib/extensions/src/lib/store/states/navigation.state.ts b/lib/extensions/src/lib/store/states/navigation.state.ts index f3897e3f87..7c8500321a 100644 --- a/lib/extensions/src/lib/store/states/navigation.state.ts +++ b/lib/extensions/src/lib/store/states/navigation.state.ts @@ -1,6 +1,6 @@ /*! * @license - * Copyright 2016 - 2018 Alfresco Software, Ltd. + * Copyright 2016 Alfresco Software, Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/lib/extensions/src/lib/store/states/profile.state.ts b/lib/extensions/src/lib/store/states/profile.state.ts index 3cd4e67a83..dd5580f021 100644 --- a/lib/extensions/src/lib/store/states/profile.state.ts +++ b/lib/extensions/src/lib/store/states/profile.state.ts @@ -1,6 +1,6 @@ /*! * @license - * Copyright 2016 - 2018 Alfresco Software, Ltd. + * Copyright 2016 Alfresco Software, Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/lib/extensions/src/lib/store/states/repository.state.ts b/lib/extensions/src/lib/store/states/repository.state.ts index 27488a9c72..7a10bc22fb 100644 --- a/lib/extensions/src/lib/store/states/repository.state.ts +++ b/lib/extensions/src/lib/store/states/repository.state.ts @@ -1,6 +1,6 @@ /*! * @license - * Copyright 2016 - 2018 Alfresco Software, Ltd. + * Copyright 2016 Alfresco Software, Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/lib/extensions/src/lib/store/states/selection.state.ts b/lib/extensions/src/lib/store/states/selection.state.ts index 8baa38d4b9..60426fdddb 100644 --- a/lib/extensions/src/lib/store/states/selection.state.ts +++ b/lib/extensions/src/lib/store/states/selection.state.ts @@ -1,6 +1,6 @@ /*! * @license - * Copyright 2016 - 2018 Alfresco Software, Ltd. + * Copyright 2016 Alfresco Software, Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/lib/extensions/src/public_api.ts b/lib/extensions/src/public_api.ts index 9d2bc485cb..19998280ad 100644 --- a/lib/extensions/src/public_api.ts +++ b/lib/extensions/src/public_api.ts @@ -1,6 +1,6 @@ /*! * @license - * Copyright 2016 - 2018 Alfresco Software, Ltd. + * Copyright 2016 Alfresco Software, Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/lib/extensions/src/test.ts b/lib/extensions/src/test.ts index e11ff1c97b..e0bac21025 100644 --- a/lib/extensions/src/test.ts +++ b/lib/extensions/src/test.ts @@ -1,3 +1,20 @@ +/*! + * @license + * Copyright 2016 Alfresco Software, Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + // This file is required by karma.conf.js and loads recursively all the .spec and framework files import 'core-js/es7/reflect'; diff --git a/lib/process-services-cloud/src/lib/app-list-cloud/app-list-cloud.module.spec.ts b/lib/process-services-cloud/src/lib/app-list-cloud/app-list-cloud.module.spec.ts index 118d58f57f..e42f3f2438 100644 --- a/lib/process-services-cloud/src/lib/app-list-cloud/app-list-cloud.module.spec.ts +++ b/lib/process-services-cloud/src/lib/app-list-cloud/app-list-cloud.module.spec.ts @@ -14,6 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { AppListCloudModule } from './app-list-cloud.module'; describe('AppListCloudModule', () => { diff --git a/lib/process-services-cloud/src/lib/process-list-cloud/components/process-list-cloud.component.ts b/lib/process-services-cloud/src/lib/process-list-cloud/components/process-list-cloud.component.ts index 5094765af3..e294ea3c93 100644 --- a/lib/process-services-cloud/src/lib/process-list-cloud/components/process-list-cloud.component.ts +++ b/lib/process-services-cloud/src/lib/process-list-cloud/components/process-list-cloud.component.ts @@ -14,6 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { Component, ViewEncapsulation, OnChanges, AfterContentInit, ContentChild, Output, EventEmitter, SimpleChanges, SimpleChange, Input } from '@angular/core'; import { DataTableSchema, PaginatedComponent, EmptyCustomContentDirective, AppConfigService, diff --git a/lib/process-services-cloud/src/lib/process-list-cloud/process-list-cloud.module.spec.ts b/lib/process-services-cloud/src/lib/process-list-cloud/process-list-cloud.module.spec.ts index 3dfd94f34e..f94ac1251c 100644 --- a/lib/process-services-cloud/src/lib/process-list-cloud/process-list-cloud.module.spec.ts +++ b/lib/process-services-cloud/src/lib/process-list-cloud/process-list-cloud.module.spec.ts @@ -14,6 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { ProcessListCloudModule } from './process-list-cloud.module'; describe('ProcessListCloudModule', () => { diff --git a/lib/process-services-cloud/src/test.ts b/lib/process-services-cloud/src/test.ts index 113f2fb302..e0bac21025 100644 --- a/lib/process-services-cloud/src/test.ts +++ b/lib/process-services-cloud/src/test.ts @@ -14,6 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + // This file is required by karma.conf.js and loads recursively all the .spec and framework files import 'core-js/es7/reflect'; diff --git a/lib/tslint.json b/lib/tslint.json index 16092d65e1..1bd18ddc42 100644 --- a/lib/tslint.json +++ b/lib/tslint.json @@ -1,224 +1,6 @@ { - "rulesDirectory": [ - "../node_modules/codelyzer", - "../tools/tslint-rules/" - ], - "extends": [ - "rxjs-tslint-rules" - ], + "extends": "../tslint.json", "rules": { - "adf-license-banner": [ - true, - "lib/+(core|content-services|process-services-cloud|process-services|insights)/**/*.ts", - "./license-community.txt" - ], - "align": [ - true, - "parameters", - "statements" - ], - "ban": [ - true, - "eval", - "fdescribe" - ], - "class-name": true, - "comment-format": [ - true, - "check-space" - ], - "curly": true, - "eofline": true, - "forin": true, - "indent": [ - true, - "spaces" - ], - "interface-name": false, - "jsdoc-format": true, - "label-position": true, - "max-line-length": [ - true, - 180 - ], - "member-ordering": [ - true, - { - "order": [ - "static-field", - "instance-field", - "static-method", - "instance-method" - ] - } - ], - "no-any": false, - "no-arg": true, - "no-bitwise": false, - "no-conditional-assignment": true, - "no-consecutive-blank-lines": true, - "no-console": [ - true, - "log", - "debug", - "info", - "time", - "timeEnd", - "trace" - ], - "no-construct": true, - "no-constructor-vars": false, - "no-debugger": true, - "no-duplicate-super": true, - "no-duplicate-variable": true, - "no-empty": false, - "no-eval": true, - "no-inferrable-types": false, - "no-internal-module": true, - "no-require-imports": false, - "no-shadowed-variable": true, - "no-switch-case-fall-through": true, - "no-trailing-whitespace": true, - "no-unused-expression": true, - "no-var-keyword": true, - "no-var-requires": true, - "object-literal-sort-keys": false, - "one-line": [ - true, - "check-open-brace", - "check-catch", - "check-else", - "check-whitespace" - ], - "quotemark": [ - true, - "single", - "avoid-escape" - ], - "radix": true, - "semicolon": [ - true, - "always" - ], - "switch-default": true, - "trailing-comma": [ - true, - { - "multiline": "never", - "singleline": "never" - } - ], - "triple-equals": [ - true, - "allow-null-check" - ], - "typedef": false, - "typedef-whitespace": [ - true, - { - "call-signature": "nospace", - "index-signature": "nospace", - "parameter": "nospace", - "property-declaration": "nospace", - "variable-declaration": "nospace" - } - ], - "use-strict": false, - "variable-name": [ - true, - "check-format", - "allow-leading-underscore", - "ban-keywords" - ], - "callable-types": true, - "import-spacing": true, - "interface-over-type-literal": true, - "member-access": false, - "no-empty-interface": true, - "no-string-literal": false, - "no-string-throw": true, - "prefer-const": false, - "unified-signatures": true, - "whitespace": [ - true, - "check-branch", - "check-decl", - "check-operator", - "check-separator", - "check-typecast", - "check-type", - "check-typecast", - "check-module" - ], - "component-selector": [ - true, - "element", - "adf", - "kebab-case" - ], - "naming-convention": [ - { - "type": "enumMember", - "format": "PascalCase" - } - ], - "arrow-parens": true, - "ordered-imports": false, - "use-input-property-decorator": true, - "use-output-property-decorator": true, - "use-host-property-decorator": false, - "use-life-cycle-interface": true, - "use-pipe-transform-interface": true, - "component-class-suffix": true, - "directive-class-suffix": true, - "adf-file-name": true, - "adf-class-name": true, - "adf-prefix-name": true, - "no-input-rename": true, - "no-output-rename": true, - "rxjs-ban-operators": { - "severity": "error" - }, - "rxjs-no-unsafe-takeuntil": { - "severity": "error" - }, - "rxjs-no-create": { - "severity": "error" - }, - "rxjs-no-ignored-subscribe": { - "severity": "error" - }, - "rxjs-no-subject-unsubscribe": { - "severity": "error" - }, - "rxjs-no-subject-value": { - "severity": "error" - }, - "rxjs-no-unsafe-catch": { - "options": [ - { - "observable": "action(s|\\$)?" - } - ], - "severity": "error" - }, - "rxjs-no-unsafe-switchmap": { - "options": [ - { - "disallow": [ - "add", - "create", - "delete", - "post", - "put", - "remove", - "set", - "update" - ], - "observable": "action(s|\\$)?" - } - ], - "severity": "error" - } + "adf-license-banner": [true, "lib/+(core|content-services|process-services|process-services-cloud|insights|extensions)/**/*.ts", "./license-community.txt"] } } diff --git a/package.json b/package.json index c291248282..b8b937a82e 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "build-lib": "./scripts/ng-packagr.sh", "bundlesize-check": "bundlesize", "lint-lib": "./node_modules/.bin/tslint -p ./lib/tsconfig.json -c ./lib/tslint.json", - "lint-e2e": "./node_modules/.bin/tslint -p ./e2e/tsconfig.e2e.json -c ./tslint.json", + "lint-e2e": "./node_modules/.bin/tslint -p ./e2e/tsconfig.e2e.json -c ./tslint.json", "test-export": "ts-node ./tools/export-check/exportCheck.ts ./lib/core/public-api.ts ./lib/process-services/public-api.ts ./lib/content-services/public-api.ts ./lib/insights/public-api.ts ./lib/process-services-cloud/public-api.ts", "ng": "ng", "affected:libs": "./node_modules/.bin/nx affected:libs", diff --git a/tslint.json b/tslint.json index cbe13e4918..066f57cbe2 100644 --- a/tslint.json +++ b/tslint.json @@ -163,6 +163,7 @@ "format": "PascalCase" } ], + "arrow-parens": true, "ordered-imports": false, "use-input-property-decorator": true, "use-output-property-decorator": true,