From bb51609af9e4f2c52c7dd7ad8b379ee908005a2c Mon Sep 17 00:00:00 2001 From: Yura Bondarenko Date: Fri, 25 Mar 2022 10:23:33 +0100 Subject: [PATCH] 87968: Update ESLint disable/enable comments eslint-disable max-classes-per-file only works at the top of the file now --- .../epeople-registry/epeople-registry.actions.ts | 3 +-- .../access-control/group-registry/group-registry.actions.ts | 3 +-- .../bitstream-formats/bitstream-format.actions.ts | 3 +-- .../metadata-registry/metadata-registry.actions.ts | 3 +-- src/app/community-list-page/community-list-service.ts | 2 +- src/app/core/auth/auth.actions.ts | 3 +-- src/app/core/browse/browse-definition-data.service.ts | 3 +-- src/app/core/cache/builders/build-decorators.spec.ts | 3 +-- src/app/core/cache/builders/link.service.spec.ts | 3 +-- src/app/core/cache/object-cache.actions.ts | 3 +-- src/app/core/cache/object-cache.reducer.ts | 3 +-- src/app/core/cache/response.models.ts | 3 +-- src/app/core/cache/server-sync-buffer.actions.ts | 3 +-- src/app/core/config/config.service.ts | 2 +- src/app/core/data/base-response-parsing.service.spec.ts | 3 +-- src/app/core/data/base-response-parsing.service.ts | 3 +-- src/app/core/data/configuration-data.service.ts | 3 +-- src/app/core/data/data.service.spec.ts | 3 +-- src/app/core/data/dspace-object-data.service.ts | 3 +-- src/app/core/data/dspace-rest-response-parsing.service.ts | 3 +-- src/app/core/data/href-only-data.service.ts | 2 +- src/app/core/data/item-template-data.service.ts | 3 +-- src/app/core/data/object-updates/object-updates.actions.ts | 3 +-- src/app/core/data/request.actions.ts | 3 +-- src/app/core/data/request.models.ts | 3 +-- src/app/core/data/request.reducer.ts | 2 +- src/app/core/data/root-data.service.ts | 3 +-- src/app/core/history/history.actions.ts | 3 +-- src/app/core/history/history.reducer.ts | 1 + src/app/core/index/index.actions.ts | 3 +-- src/app/core/json-patch/json-patch-operations.actions.ts | 3 +-- src/app/core/metadata/meta-tag.actions.ts | 2 +- src/app/core/resource-policy/resource-policy.service.ts | 3 +-- src/app/core/router/router.actions.ts | 3 +-- src/app/core/services/route.actions.ts | 3 +-- src/app/core/shared/NoContent.model.ts | 1 + src/app/core/shared/generic-constructor.ts | 2 -- src/app/core/shared/metadata.models.ts | 3 +-- src/app/core/shared/search/search.service.ts | 2 +- src/app/core/submission/vocabularies/vocabulary.service.ts | 3 +-- src/app/core/tasks/tasks.service.spec.ts | 3 +-- src/app/core/utilities/equatable.spec.ts | 2 +- .../item-page/edit-item-page/edit-item-page.component.spec.ts | 2 +- .../metadata-field-wrapper.component.spec.ts | 3 +-- .../collection-selector/collection-selector.component.spec.ts | 2 +- .../existing-metadata-list-element.component.ts | 3 +-- .../existing-relation-list-element.component.ts | 3 +-- .../models/onebox/dynamic-onebox.component.spec.ts | 3 +-- .../relation-lookup-modal/name-variant.actions.ts | 3 +-- .../relation-lookup-modal/relationship.actions.ts | 3 +-- src/app/shared/form/form.actions.ts | 3 +-- src/app/shared/menu/menu.actions.ts | 3 +-- .../metadata-representation.decorator.spec.ts | 2 +- .../switcher/claimed-task-actions-decorator.spec.ts | 2 +- src/app/shared/notifications/notifications.actions.ts | 3 +-- src/app/shared/notifications/notifications.reducers.ts | 1 + .../shared/listable-object/listable-object.decorator.spec.ts | 2 +- .../object-list/selectable-list/selectable-list.actions.ts | 3 +-- .../selectable-list/selectable-list.reducer.spec.ts | 3 +-- src/app/shared/object-select/object-select.actions.ts | 3 +-- .../search-filters/search-filter/search-filter.actions.ts | 3 +-- src/app/shared/sidebar/filter/sidebar-filter.actions.ts | 3 +-- src/app/shared/sidebar/sidebar-effects.service.ts | 3 +-- src/app/shared/sidebar/sidebar.actions.ts | 3 +-- src/app/shared/theme-support/themed.component.spec.ts | 3 +-- src/app/shared/truncatable/truncatable.actions.ts | 3 +-- .../vocabulary-treeview/vocabulary-treeview-node.model.ts | 3 +-- src/app/submission/objects/submission-objects.actions.ts | 3 +-- src/config/config.server.ts | 1 + src/config/theme.model.ts | 2 +- 70 files changed, 69 insertions(+), 119 deletions(-) diff --git a/src/app/access-control/epeople-registry/epeople-registry.actions.ts b/src/app/access-control/epeople-registry/epeople-registry.actions.ts index 8fa0a886d8..a07ea37df2 100644 --- a/src/app/access-control/epeople-registry/epeople-registry.actions.ts +++ b/src/app/access-control/epeople-registry/epeople-registry.actions.ts @@ -1,3 +1,4 @@ +/* eslint-disable max-classes-per-file */ import { Action } from '@ngrx/store'; import { EPerson } from '../../core/eperson/models/eperson.model'; import { type } from '../../shared/ngrx/type'; @@ -16,7 +17,6 @@ export const EPeopleRegistryActionTypes = { CANCEL_EDIT_EPERSON: type('dspace/epeople-registry/CANCEL_EDIT_EPERSON'), }; -/* eslint-disable max-classes-per-file */ /** * Used to edit an EPerson in the EPeople registry */ @@ -37,7 +37,6 @@ export class EPeopleRegistryCancelEPersonAction implements Action { type = EPeopleRegistryActionTypes.CANCEL_EDIT_EPERSON; } -/* eslint-enable max-classes-per-file */ /** * Export a type alias of all actions in this action group diff --git a/src/app/access-control/group-registry/group-registry.actions.ts b/src/app/access-control/group-registry/group-registry.actions.ts index 591f39b3ec..8144bd0599 100644 --- a/src/app/access-control/group-registry/group-registry.actions.ts +++ b/src/app/access-control/group-registry/group-registry.actions.ts @@ -1,3 +1,4 @@ +/* eslint-disable max-classes-per-file */ import { Action } from '@ngrx/store'; import { Group } from '../../core/eperson/models/group.model'; import { type } from '../../shared/ngrx/type'; @@ -16,7 +17,6 @@ export const GroupRegistryActionTypes = { CANCEL_EDIT_GROUP: type('dspace/epeople-registry/CANCEL_EDIT_GROUP'), }; -/* eslint-disable max-classes-per-file */ /** * Used to edit a Group in the Group registry */ @@ -37,7 +37,6 @@ export class GroupRegistryCancelGroupAction implements Action { type = GroupRegistryActionTypes.CANCEL_EDIT_GROUP; } -/* eslint-enable max-classes-per-file */ /** * Export a type alias of all actions in this action group diff --git a/src/app/admin/admin-registries/bitstream-formats/bitstream-format.actions.ts b/src/app/admin/admin-registries/bitstream-formats/bitstream-format.actions.ts index d163c2fa6d..c5bebb292b 100644 --- a/src/app/admin/admin-registries/bitstream-formats/bitstream-format.actions.ts +++ b/src/app/admin/admin-registries/bitstream-formats/bitstream-format.actions.ts @@ -1,3 +1,4 @@ +/* eslint-disable max-classes-per-file */ import { Action } from '@ngrx/store'; import { type } from '../../../shared/ngrx/type'; import { BitstreamFormat } from '../../../core/shared/bitstream-format.model'; @@ -17,7 +18,6 @@ export const BitstreamFormatsRegistryActionTypes = { DESELECT_ALL_FORMAT: type('dspace/bitstream-formats-registry/DESELECT_ALL_FORMAT') }; -/* eslint-disable max-classes-per-file */ /** * Used to select a single bitstream format in the bitstream format registry */ @@ -51,7 +51,6 @@ export class BitstreamFormatsRegistryDeselectAllAction implements Action { type = BitstreamFormatsRegistryActionTypes.DESELECT_ALL_FORMAT; } -/* eslint-enable max-classes-per-file */ /** * Export a type alias of all actions in this action group diff --git a/src/app/admin/admin-registries/metadata-registry/metadata-registry.actions.ts b/src/app/admin/admin-registries/metadata-registry/metadata-registry.actions.ts index f22f2a365f..3fc872ca43 100644 --- a/src/app/admin/admin-registries/metadata-registry/metadata-registry.actions.ts +++ b/src/app/admin/admin-registries/metadata-registry/metadata-registry.actions.ts @@ -1,3 +1,4 @@ +/* eslint-disable max-classes-per-file */ import { Action } from '@ngrx/store'; import { type } from '../../../shared/ngrx/type'; import { MetadataSchema } from '../../../core/metadata/metadata-schema.model'; @@ -26,7 +27,6 @@ export const MetadataRegistryActionTypes = { DESELECT_ALL_FIELD: type('dspace/metadata-registry/DESELECT_ALL_FIELD') }; -/* eslint-disable max-classes-per-file */ /** * Used to edit a metadata schema in the metadata registry */ @@ -133,7 +133,6 @@ export class MetadataRegistryDeselectAllFieldAction implements Action { type = MetadataRegistryActionTypes.DESELECT_ALL_FIELD; } -/* eslint-enable max-classes-per-file */ /** * Export a type alias of all actions in this action group diff --git a/src/app/community-list-page/community-list-service.ts b/src/app/community-list-page/community-list-service.ts index 67f462e99e..bceb1d65e8 100644 --- a/src/app/community-list-page/community-list-service.ts +++ b/src/app/community-list-page/community-list-service.ts @@ -1,3 +1,4 @@ +/* eslint-disable max-classes-per-file */ import { Injectable } from '@angular/core'; import { createSelector, Store } from '@ngrx/store'; @@ -108,7 +109,6 @@ export const MAX_COMCOLS_PER_PAGE = 20; * Service class for the community list, responsible for the creating of the flat list used by communityList dataSource * and connection to the store to retrieve and save the state of the community list */ -// eslint-disable-next-line max-classes-per-file @Injectable() export class CommunityListService { diff --git a/src/app/core/auth/auth.actions.ts b/src/app/core/auth/auth.actions.ts index 75d60ac977..60440d371e 100644 --- a/src/app/core/auth/auth.actions.ts +++ b/src/app/core/auth/auth.actions.ts @@ -1,3 +1,4 @@ +/* eslint-disable max-classes-per-file */ // import @ngrx import { Action } from '@ngrx/store'; // import type function @@ -39,7 +40,6 @@ export const AuthActionTypes = { UNSET_USER_AS_IDLE: type('dspace/auth/UNSET_USER_AS_IDLE') }; -/* eslint-disable max-classes-per-file */ /** * Authenticate. @@ -411,7 +411,6 @@ export class SetUserAsIdleAction implements Action { export class UnsetUserAsIdleAction implements Action { public type: string = AuthActionTypes.UNSET_USER_AS_IDLE; } -/* eslint-enable max-classes-per-file */ /** * Actions type. diff --git a/src/app/core/browse/browse-definition-data.service.ts b/src/app/core/browse/browse-definition-data.service.ts index 334c092826..e8e84ec7ea 100644 --- a/src/app/core/browse/browse-definition-data.service.ts +++ b/src/app/core/browse/browse-definition-data.service.ts @@ -1,3 +1,4 @@ +/* eslint-disable max-classes-per-file */ import { Injectable } from '@angular/core'; import { dataService } from '../cache/builders/build-decorators'; import { BROWSE_DEFINITION } from '../shared/browse-definition.resource-type'; @@ -18,7 +19,6 @@ import { RemoteData } from '../data/remote-data'; import { FindListOptions } from '../data/request.models'; import { PaginatedList } from '../data/paginated-list.model'; -/* eslint-disable max-classes-per-file */ class DataServiceImpl extends DataService { protected linkPath = 'browses'; @@ -123,4 +123,3 @@ export class BrowseDefinitionDataService { } } -/* eslint-enable max-classes-per-file */ diff --git a/src/app/core/cache/builders/build-decorators.spec.ts b/src/app/core/cache/builders/build-decorators.spec.ts index 57c2740c49..064a2b3f83 100644 --- a/src/app/core/cache/builders/build-decorators.spec.ts +++ b/src/app/core/cache/builders/build-decorators.spec.ts @@ -1,9 +1,9 @@ +/* eslint-disable max-classes-per-file */ import { HALLink } from '../../shared/hal-link.model'; import { HALResource } from '../../shared/hal-resource.model'; import { ResourceType } from '../../shared/resource-type'; import { dataService, getDataServiceFor, getLinkDefinition, link, } from './build-decorators'; -/* eslint-disable max-classes-per-file */ class TestService { } @@ -80,4 +80,3 @@ describe('build decorators', () => { }); }); }); -/* eslint-enable max-classes-per-file */ diff --git a/src/app/core/cache/builders/link.service.spec.ts b/src/app/core/cache/builders/link.service.spec.ts index b151bfd3e8..d95d1bf4d9 100644 --- a/src/app/core/cache/builders/link.service.spec.ts +++ b/src/app/core/cache/builders/link.service.spec.ts @@ -1,3 +1,4 @@ +/* eslint-disable max-classes-per-file */ import { Injectable } from '@angular/core'; import { TestBed } from '@angular/core/testing'; import { followLink, FollowLinkConfig } from '../../../shared/utils/follow-link-config.model'; @@ -12,7 +13,6 @@ import { isEmpty } from 'rxjs/operators'; const TEST_MODEL = new ResourceType('testmodel'); let result: any; -/* eslint-disable max-classes-per-file */ class TestModel implements HALResource { static type = TEST_MODEL; @@ -251,4 +251,3 @@ describe('LinkService', () => { }); }); -/* eslint-enable max-classes-per-file */ diff --git a/src/app/core/cache/object-cache.actions.ts b/src/app/core/cache/object-cache.actions.ts index 5011c937d7..6834976c58 100644 --- a/src/app/core/cache/object-cache.actions.ts +++ b/src/app/core/cache/object-cache.actions.ts @@ -1,3 +1,4 @@ +/* eslint-disable max-classes-per-file */ import { Action } from '@ngrx/store'; import { type } from '../../shared/ngrx/type'; @@ -15,7 +16,6 @@ export const ObjectCacheActionTypes = { APPLY_PATCH: type('dspace/core/cache/object/APPLY_PATCH') }; -/* eslint-disable max-classes-per-file */ /** * An ngrx action to add an object to the cache */ @@ -126,7 +126,6 @@ export class ApplyPatchObjectCacheAction implements Action { } } -/* eslint-enable max-classes-per-file */ /** * A type to encompass all ObjectCacheActions diff --git a/src/app/core/cache/object-cache.reducer.ts b/src/app/core/cache/object-cache.reducer.ts index 946f9ed33a..097e56bb76 100644 --- a/src/app/core/cache/object-cache.reducer.ts +++ b/src/app/core/cache/object-cache.reducer.ts @@ -1,3 +1,4 @@ +/* eslint-disable max-classes-per-file */ import { HALLink } from '../shared/hal-link.model'; import { HALResource } from '../shared/hal-resource.model'; import { @@ -49,7 +50,6 @@ export const getResourceTypeValueFor = (type: any): string => { } }; -/* eslint-disable max-classes-per-file */ /** * An interface to represent objects that can be cached * @@ -110,7 +110,6 @@ export class ObjectCacheEntry implements CacheEntry { alternativeLinks: string[]; } -/* eslint-enable max-classes-per-file */ /** * The ObjectCache State diff --git a/src/app/core/cache/response.models.ts b/src/app/core/cache/response.models.ts index 56505eedb7..8915ae02da 100644 --- a/src/app/core/cache/response.models.ts +++ b/src/app/core/cache/response.models.ts @@ -1,3 +1,4 @@ +/* eslint-disable max-classes-per-file */ import { RequestError } from '../data/request.models'; import { PageInfo } from '../shared/page-info.model'; import { ConfigObject } from '../config/models/config.model'; @@ -5,7 +6,6 @@ import { DSpaceObject } from '../shared/dspace-object.model'; import { HALLink } from '../shared/hal-link.model'; import { UnCacheableObject } from '../shared/uncacheable-object.model'; -/* eslint-disable max-classes-per-file */ export class RestResponse { public toCache = true; public timeCompleted: number; @@ -140,4 +140,3 @@ export class FilteredDiscoveryQueryResponse extends RestResponse { super(true, statusCode, statusText); } } -/* eslint-enable max-classes-per-file */ diff --git a/src/app/core/cache/server-sync-buffer.actions.ts b/src/app/core/cache/server-sync-buffer.actions.ts index a40343c6b5..c07c4e6adf 100644 --- a/src/app/core/cache/server-sync-buffer.actions.ts +++ b/src/app/core/cache/server-sync-buffer.actions.ts @@ -1,3 +1,4 @@ +/* eslint-disable max-classes-per-file */ import { Action } from '@ngrx/store'; import { type } from '../../shared/ngrx/type'; @@ -12,7 +13,6 @@ export const ServerSyncBufferActionTypes = { EMPTY: type('dspace/core/cache/syncbuffer/EMPTY'), }; -/* eslint-disable max-classes-per-file */ /** * An ngrx action to add a new cached object to the server sync buffer @@ -71,7 +71,6 @@ export class EmptySSBAction implements Action { } } -/* eslint-enable max-classes-per-file */ /** * A type to encompass all ServerSyncBufferActions diff --git a/src/app/core/config/config.service.ts b/src/app/core/config/config.service.ts index 46e29d19c5..a429348e9f 100644 --- a/src/app/core/config/config.service.ts +++ b/src/app/core/config/config.service.ts @@ -1,3 +1,4 @@ +/* eslint-disable max-classes-per-file */ import { Observable } from 'rxjs'; import { RequestService } from '../data/request.service'; import { HALEndpointService } from '../shared/hal-endpoint.service'; @@ -31,7 +32,6 @@ class DataServiceImpl extends DataService { } } -// eslint-disable-next-line max-classes-per-file export abstract class ConfigService { /** * A private DataService instance to delegate specific methods to. diff --git a/src/app/core/data/base-response-parsing.service.spec.ts b/src/app/core/data/base-response-parsing.service.spec.ts index f679094b43..6688eec662 100644 --- a/src/app/core/data/base-response-parsing.service.spec.ts +++ b/src/app/core/data/base-response-parsing.service.spec.ts @@ -1,10 +1,10 @@ +/* eslint-disable max-classes-per-file */ import { BaseResponseParsingService } from './base-response-parsing.service'; import { ObjectCacheService } from '../cache/object-cache.service'; import { CacheableObject } from '../cache/object-cache.reducer'; import { GetRequest, RestRequest } from './request.models'; import { DSpaceObject } from '../shared/dspace-object.model'; -/* eslint-disable max-classes-per-file */ class TestService extends BaseResponseParsingService { toCache = true; @@ -101,4 +101,3 @@ describe('BaseResponseParsingService', () => { }); }); }); -/* eslint-enable max-classes-per-file */ diff --git a/src/app/core/data/base-response-parsing.service.ts b/src/app/core/data/base-response-parsing.service.ts index 95129cac64..340d96df26 100644 --- a/src/app/core/data/base-response-parsing.service.ts +++ b/src/app/core/data/base-response-parsing.service.ts @@ -1,3 +1,4 @@ +/* eslint-disable max-classes-per-file */ import { hasNoValue, hasValue, isNotEmpty } from '../../shared/empty.util'; import { DSpaceSerializer } from '../dspace-rest/dspace.serializer'; import { CacheableObject } from '../cache/object-cache.reducer'; @@ -10,7 +11,6 @@ import { getClassForType } from '../cache/builders/build-decorators'; import { RestRequest } from './request.models'; import { environment } from '../../../environments/environment'; -/* eslint-disable max-classes-per-file */ /** * Return true if halObj has a value for `_links.self` @@ -180,4 +180,3 @@ export abstract class BaseResponseParsingService { return statusCode >= 200 && statusCode < 300; } } -/* eslint-enable max-classes-per-file */ diff --git a/src/app/core/data/configuration-data.service.ts b/src/app/core/data/configuration-data.service.ts index d19b63d629..0870124518 100644 --- a/src/app/core/data/configuration-data.service.ts +++ b/src/app/core/data/configuration-data.service.ts @@ -1,3 +1,4 @@ +/* eslint-disable max-classes-per-file */ import { HttpClient } from '@angular/common/http'; import { Injectable } from '@angular/core'; import { Store } from '@ngrx/store'; @@ -15,7 +16,6 @@ import { ConfigurationProperty } from '../shared/configuration-property.model'; import { DefaultChangeAnalyzer } from './default-change-analyzer.service'; import { CONFIG_PROPERTY } from '../shared/config-property.resource-type'; -/* eslint-disable max-classes-per-file */ class DataServiceImpl extends DataService { protected linkPath = 'properties'; @@ -60,4 +60,3 @@ export class ConfigurationDataService { return this.dataService.findById(name); } } -/* eslint-enable max-classes-per-file */ diff --git a/src/app/core/data/data.service.spec.ts b/src/app/core/data/data.service.spec.ts index de187999af..093326f8c0 100644 --- a/src/app/core/data/data.service.spec.ts +++ b/src/app/core/data/data.service.spec.ts @@ -1,3 +1,4 @@ +/* eslint-disable max-classes-per-file */ import { HttpClient } from '@angular/common/http'; import { Store } from '@ngrx/store'; import { compare, Operation } from 'fast-json-patch'; @@ -26,7 +27,6 @@ import { RequestEntryState } from './request.reducer'; const endpoint = 'https://rest.api/core'; -/* eslint-disable max-classes-per-file */ class TestService extends DataService { constructor( @@ -833,4 +833,3 @@ describe('DataService', () => { }); }); }); -/* eslint-enable max-classes-per-file */ diff --git a/src/app/core/data/dspace-object-data.service.ts b/src/app/core/data/dspace-object-data.service.ts index 62feb0c909..1e7ee6a59b 100644 --- a/src/app/core/data/dspace-object-data.service.ts +++ b/src/app/core/data/dspace-object-data.service.ts @@ -1,3 +1,4 @@ +/* eslint-disable max-classes-per-file */ import { HttpClient } from '@angular/common/http'; import { Injectable } from '@angular/core'; import { Store } from '@ngrx/store'; @@ -18,7 +19,6 @@ import { RequestService } from './request.service'; import { FindListOptions } from './request.models'; import { PaginatedList } from './paginated-list.model'; -/* eslint-disable max-classes-per-file */ class DataServiceImpl extends DataService { protected linkPath = 'dso'; @@ -104,4 +104,3 @@ export class DSpaceObjectDataService { } } -/* eslint-enable max-classes-per-file */ diff --git a/src/app/core/data/dspace-rest-response-parsing.service.ts b/src/app/core/data/dspace-rest-response-parsing.service.ts index cb207e6187..7be767f7f3 100644 --- a/src/app/core/data/dspace-rest-response-parsing.service.ts +++ b/src/app/core/data/dspace-rest-response-parsing.service.ts @@ -1,3 +1,4 @@ +/* eslint-disable max-classes-per-file */ import { hasNoValue, hasValue, isNotEmpty } from '../../shared/empty.util'; import { DSpaceSerializer } from '../dspace-rest/dspace.serializer'; import { CacheableObject } from '../cache/object-cache.reducer'; @@ -18,7 +19,6 @@ import { RestRequestMethod } from './rest-request-method'; import { getUrlWithoutEmbedParams, getEmbedSizeParams } from '../index/index.selectors'; import { URLCombiner } from '../url-combiner/url-combiner'; -/* eslint-disable max-classes-per-file */ /** * Return true if obj has a value for `_links.self` @@ -271,4 +271,3 @@ export class DspaceRestResponseParsingService implements ResponseParsingService return statusCode >= 200 && statusCode < 300; } } -/* eslint-enable max-classes-per-file */ diff --git a/src/app/core/data/href-only-data.service.ts b/src/app/core/data/href-only-data.service.ts index 595f8582d6..93e85c3528 100644 --- a/src/app/core/data/href-only-data.service.ts +++ b/src/app/core/data/href-only-data.service.ts @@ -1,3 +1,4 @@ +/* eslint-disable max-classes-per-file */ import { DataService } from './data.service'; import { RequestService } from './request.service'; import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service'; @@ -20,7 +21,6 @@ import { ITEM_TYPE } from '../shared/item-relationships/item-type.resource-type' import { LICENSE } from '../shared/license.resource-type'; import { CacheableObject } from '../cache/object-cache.reducer'; -/* eslint-disable max-classes-per-file */ class DataServiceImpl extends DataService { // linkPath isn't used if we're only searching by href. protected linkPath = undefined; diff --git a/src/app/core/data/item-template-data.service.ts b/src/app/core/data/item-template-data.service.ts index 20398afe1d..db3fb8e711 100644 --- a/src/app/core/data/item-template-data.service.ts +++ b/src/app/core/data/item-template-data.service.ts @@ -1,3 +1,4 @@ +/* eslint-disable max-classes-per-file */ import { Injectable } from '@angular/core'; import { ItemDataService } from './item-data.service'; import { UpdateDataService } from './update-data.service'; @@ -24,7 +25,6 @@ import { hasValue } from '../../shared/empty.util'; import { Operation } from 'fast-json-patch'; import { getFirstCompletedRemoteData } from '../shared/operators'; -/* eslint-disable max-classes-per-file */ /** * A custom implementation of the ItemDataService, but for collection item templates * Makes sure to change the endpoint before sending out CRUD requests for the item template @@ -228,4 +228,3 @@ export class ItemTemplateDataService implements UpdateDataService { return this.dataService.getCollectionEndpoint(collectionID); } } -/* eslint-enable max-classes-per-file */ diff --git a/src/app/core/data/object-updates/object-updates.actions.ts b/src/app/core/data/object-updates/object-updates.actions.ts index 76dba8a982..628cfaad1a 100644 --- a/src/app/core/data/object-updates/object-updates.actions.ts +++ b/src/app/core/data/object-updates/object-updates.actions.ts @@ -1,3 +1,4 @@ +/* eslint-disable max-classes-per-file */ import {type} from '../../../shared/ngrx/type'; import {Action} from '@ngrx/store'; import {Identifiable} from './object-updates.reducer'; @@ -21,7 +22,6 @@ export const ObjectUpdatesActionTypes = { REMOVE_FIELD: type('dspace/core/cache/object-updates/REMOVE_FIELD') }; -/* eslint-disable max-classes-per-file */ /** * Enum that represents the different types of updates that can be performed on a field in the ObjectUpdates store @@ -283,7 +283,6 @@ export class RemoveFieldUpdateAction implements Action { } } -/* eslint-enable max-classes-per-file */ /** * A type to encompass all ObjectUpdatesActions diff --git a/src/app/core/data/request.actions.ts b/src/app/core/data/request.actions.ts index afdbc0865f..be7a0a7606 100644 --- a/src/app/core/data/request.actions.ts +++ b/src/app/core/data/request.actions.ts @@ -1,3 +1,4 @@ +/* eslint-disable max-classes-per-file */ import { Action } from '@ngrx/store'; import { type } from '../../shared/ngrx/type'; import { RestRequest } from './request.models'; @@ -17,7 +18,6 @@ export const RequestActionTypes = { REMOVE: type('dspace/core/data/request/REMOVE') }; -/* eslint-disable max-classes-per-file */ export abstract class RequestUpdateAction implements Action { abstract type: string; lastUpdated: number; @@ -185,7 +185,6 @@ export class RequestRemoveAction implements Action { } } -/* eslint-enable max-classes-per-file */ /** * A type to encompass all RequestActions diff --git a/src/app/core/data/request.models.ts b/src/app/core/data/request.models.ts index 5179330214..cae6297ef3 100644 --- a/src/app/core/data/request.models.ts +++ b/src/app/core/data/request.models.ts @@ -1,3 +1,4 @@ +/* eslint-disable max-classes-per-file */ import { SortOptions } from '../cache/models/sort-options.model'; import { GenericConstructor } from '../shared/generic-constructor'; import { ResponseParsingService } from './parsing.service'; @@ -11,7 +12,6 @@ import { ContentSourceResponseParsingService } from './content-source-response-p import { DspaceRestResponseParsingService } from './dspace-rest-response-parsing.service'; import { environment } from '../../../environments/environment'; -/* eslint-disable max-classes-per-file */ // uuid and handle requests have separate endpoints export enum IdentifierType { @@ -280,4 +280,3 @@ export class RequestError extends Error { statusCode: number; statusText: string; } -/* eslint-enable max-classes-per-file */ diff --git a/src/app/core/data/request.reducer.ts b/src/app/core/data/request.reducer.ts index 4bb8348b34..8f20345ef1 100644 --- a/src/app/core/data/request.reducer.ts +++ b/src/app/core/data/request.reducer.ts @@ -1,3 +1,4 @@ +/* eslint-disable max-classes-per-file */ import { RequestAction, RequestActionTypes, @@ -112,7 +113,6 @@ export class ResponseState { unCacheableObject?: UnCacheableObject; } -// eslint-disable-next-line max-classes-per-file export class RequestEntry { request: RestRequest; state: RequestEntryState; diff --git a/src/app/core/data/root-data.service.ts b/src/app/core/data/root-data.service.ts index bde56fa43c..e536c1b61b 100644 --- a/src/app/core/data/root-data.service.ts +++ b/src/app/core/data/root-data.service.ts @@ -1,3 +1,4 @@ +/* eslint-disable max-classes-per-file */ import { DataService } from './data.service'; import { Root } from './root.model'; import { Injectable } from '@angular/core'; @@ -21,7 +22,6 @@ import { DspaceRestService } from '../dspace-rest/dspace-rest.service'; import { RawRestResponse } from '../dspace-rest/raw-rest-response.model'; import { catchError, map } from 'rxjs/operators'; -/* eslint-disable max-classes-per-file */ /** * A private DataService implementation to delegate specific methods to. @@ -131,4 +131,3 @@ export class RootDataService { this.requestService.setStaleByHrefSubstring(this.halService.getRootHref()); } } -/* eslint-enable max-classes-per-file */ diff --git a/src/app/core/history/history.actions.ts b/src/app/core/history/history.actions.ts index 8cff58cbcf..f49e3984d1 100644 --- a/src/app/core/history/history.actions.ts +++ b/src/app/core/history/history.actions.ts @@ -1,3 +1,4 @@ +/* eslint-disable max-classes-per-file */ import { Action } from '@ngrx/store'; import { type } from '../../shared/ngrx/type'; @@ -7,7 +8,6 @@ export const HistoryActionTypes = { GET_HISTORY: type('dspace/history/GET_HISTORY') }; -/* eslint-disable max-classes-per-file */ export class AddUrlToHistoryAction implements Action { type = HistoryActionTypes.ADD_TO_HISTORY; @@ -20,7 +20,6 @@ export class AddUrlToHistoryAction implements Action { } } -/* eslint-enable max-classes-per-file */ export type HistoryAction = AddUrlToHistoryAction; diff --git a/src/app/core/history/history.reducer.ts b/src/app/core/history/history.reducer.ts index d429d4a517..a073a15466 100644 --- a/src/app/core/history/history.reducer.ts +++ b/src/app/core/history/history.reducer.ts @@ -3,6 +3,7 @@ import { AddUrlToHistoryAction, HistoryAction, HistoryActionTypes } from './hist /** * The auth state. */ +// eslint-disable-next-line @typescript-eslint/no-empty-interface export interface HistoryState extends Array { } diff --git a/src/app/core/index/index.actions.ts b/src/app/core/index/index.actions.ts index ff31393bf6..1a6a784aa7 100644 --- a/src/app/core/index/index.actions.ts +++ b/src/app/core/index/index.actions.ts @@ -1,3 +1,4 @@ +/* eslint-disable max-classes-per-file */ import { Action } from '@ngrx/store'; import { type } from '../../shared/ngrx/type'; @@ -12,7 +13,6 @@ export const IndexActionTypes = { REMOVE_BY_SUBSTRING: type('dspace/core/index/REMOVE_BY_SUBSTRING') }; -/* eslint-disable max-classes-per-file */ /** * An ngrx action to add a value to the index */ @@ -86,7 +86,6 @@ export class RemoveFromIndexBySubstringAction implements Action { } } -/* eslint-enable max-classes-per-file */ /** * A type to encompass all HrefIndexActions diff --git a/src/app/core/json-patch/json-patch-operations.actions.ts b/src/app/core/json-patch/json-patch-operations.actions.ts index b52c19d002..6fea7a58fb 100644 --- a/src/app/core/json-patch/json-patch-operations.actions.ts +++ b/src/app/core/json-patch/json-patch-operations.actions.ts @@ -1,3 +1,4 @@ +/* eslint-disable max-classes-per-file */ import { Action } from '@ngrx/store'; import { type } from '../../shared/ngrx/type'; @@ -23,7 +24,6 @@ export const JsonPatchOperationsActionTypes = { DELETE_PENDING_JSON_PATCH_OPERATIONS: type('dspace/core/patch/DELETE_PENDING_JSON_PATCH_OPERATIONS'), }; -/* eslint-disable max-classes-per-file */ /** * An ngrx action to commit the current transaction @@ -269,7 +269,6 @@ export class DeletePendingJsonPatchOperationsAction implements Action { type = JsonPatchOperationsActionTypes.DELETE_PENDING_JSON_PATCH_OPERATIONS; } -/* eslint-enable max-classes-per-file */ /** * Export a type alias of all actions in this action group diff --git a/src/app/core/metadata/meta-tag.actions.ts b/src/app/core/metadata/meta-tag.actions.ts index bc878663ce..5a1ff8fd3d 100644 --- a/src/app/core/metadata/meta-tag.actions.ts +++ b/src/app/core/metadata/meta-tag.actions.ts @@ -1,7 +1,7 @@ +/* eslint-disable max-classes-per-file */ import { type } from '../../shared/ngrx/type'; import { Action } from '@ngrx/store'; -/* eslint-disable max-classes-per-file */ export const MetaTagTypes = { ADD: type('dspace/meta-tag/ADD'), CLEAR: type('dspace/meta-tag/CLEAR') diff --git a/src/app/core/resource-policy/resource-policy.service.ts b/src/app/core/resource-policy/resource-policy.service.ts index 4be64081a1..4ce23f0239 100644 --- a/src/app/core/resource-policy/resource-policy.service.ts +++ b/src/app/core/resource-policy/resource-policy.service.ts @@ -1,3 +1,4 @@ +/* eslint-disable max-classes-per-file */ import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; @@ -28,7 +29,6 @@ import { map } from 'rxjs/operators'; import { NoContent } from '../shared/NoContent.model'; import { getFirstCompletedRemoteData } from '../shared/operators'; -/* eslint-disable max-classes-per-file */ /** * A private DataService implementation to delegate specific methods to. @@ -222,4 +222,3 @@ export class ResourcePolicyService { } } -/* eslint-enable max-classes-per-file */ diff --git a/src/app/core/router/router.actions.ts b/src/app/core/router/router.actions.ts index 0c70419541..e4823536c6 100644 --- a/src/app/core/router/router.actions.ts +++ b/src/app/core/router/router.actions.ts @@ -1,3 +1,4 @@ +/* eslint-disable max-classes-per-file */ import { Action } from '@ngrx/store'; import { type } from '../../shared/ngrx/type'; @@ -8,7 +9,6 @@ export const RouterActionTypes = { ROUTE_UPDATE: type('dspace/core/router/ROUTE_UPDATE'), }; -/* eslint-disable max-classes-per-file */ /** * An ngrx action to be fired when the route is updated * Note that, contrary to the router-store.ROUTER_NAVIGATION action, @@ -19,4 +19,3 @@ export class RouteUpdateAction implements Action { type = RouterActionTypes.ROUTE_UPDATE; } -/* eslint-enable max-classes-per-file */ diff --git a/src/app/core/services/route.actions.ts b/src/app/core/services/route.actions.ts index 9c189207e6..87fe0a5c5f 100644 --- a/src/app/core/services/route.actions.ts +++ b/src/app/core/services/route.actions.ts @@ -1,3 +1,4 @@ +/* eslint-disable max-classes-per-file */ import { Action } from '@ngrx/store'; import { type } from '../../shared/ngrx/type'; import { Params } from '@angular/router'; @@ -15,7 +16,6 @@ export const RouteActionTypes = { RESET: type('dspace/core/route/RESET'), }; -/* eslint-disable max-classes-per-file */ /** * An ngrx action to set the query parameters */ @@ -151,7 +151,6 @@ export class ResetRouteStateAction implements Action { type = RouteActionTypes.RESET; } -/* eslint-enable max-classes-per-file */ /** * A type to encompass all RouteActions diff --git a/src/app/core/shared/NoContent.model.ts b/src/app/core/shared/NoContent.model.ts index 2bd1d110ac..8ac2048f2b 100644 --- a/src/app/core/shared/NoContent.model.ts +++ b/src/app/core/shared/NoContent.model.ts @@ -1,4 +1,5 @@ /** * Represents the payload of a purposefully empty rest response */ +// eslint-disable-next-line @typescript-eslint/no-empty-interface export interface NoContent {} diff --git a/src/app/core/shared/generic-constructor.ts b/src/app/core/shared/generic-constructor.ts index 2298c29b60..c121ee54fb 100644 --- a/src/app/core/shared/generic-constructor.ts +++ b/src/app/core/shared/generic-constructor.ts @@ -3,6 +3,4 @@ * more details: * https://github.com/Microsoft/TypeScript/issues/204#issuecomment-257722306 */ -/* eslint-disable @typescript-eslint/consistent-type-definitions */ export type GenericConstructor = new (...args: any[]) => T ; -/* eslint-enable @typescript-eslint/consistent-type-definitions */ diff --git a/src/app/core/shared/metadata.models.ts b/src/app/core/shared/metadata.models.ts index 3d263148d6..52f1805e8c 100644 --- a/src/app/core/shared/metadata.models.ts +++ b/src/app/core/shared/metadata.models.ts @@ -1,7 +1,7 @@ +/* eslint-disable max-classes-per-file */ import { v4 as uuidv4 } from 'uuid'; import { autoserialize, Serialize, Deserialize } from 'cerialize'; import { hasValue } from '../../shared/empty.util'; -/* eslint-disable max-classes-per-file */ export const VIRTUAL_METADATA_PREFIX = 'virtual::'; @@ -138,4 +138,3 @@ export const MetadataMapSerializer = { return metadataMap; } }; -/* eslint-enable max-classes-per-file */ diff --git a/src/app/core/shared/search/search.service.ts b/src/app/core/shared/search/search.service.ts index c8dd268311..6c3715a8a4 100644 --- a/src/app/core/shared/search/search.service.ts +++ b/src/app/core/shared/search/search.service.ts @@ -1,3 +1,4 @@ +/* eslint-disable max-classes-per-file */ import { combineLatest as observableCombineLatest, Observable } from 'rxjs'; import { Injectable, OnDestroy } from '@angular/core'; import { Router } from '@angular/router'; @@ -44,7 +45,6 @@ import { NotificationsService } from '../../../shared/notifications/notification import { HttpClient } from '@angular/common/http'; import { DSOChangeAnalyzer } from '../../data/dso-change-analyzer.service'; -/* eslint-disable max-classes-per-file */ /** * A class that lets us delegate some methods to DataService */ diff --git a/src/app/core/submission/vocabularies/vocabulary.service.ts b/src/app/core/submission/vocabularies/vocabulary.service.ts index 22a1e4798d..85d92cc10a 100644 --- a/src/app/core/submission/vocabularies/vocabulary.service.ts +++ b/src/app/core/submission/vocabularies/vocabulary.service.ts @@ -1,3 +1,4 @@ +/* eslint-disable max-classes-per-file */ import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; @@ -34,7 +35,6 @@ import { VocabularyOptions } from './models/vocabulary-options.model'; import { PageInfo } from '../../shared/page-info.model'; import { HrefOnlyDataService } from '../../data/href-only-data.service'; -/* eslint-disable max-classes-per-file */ /** * A private DataService implementation to delegate specific methods to. @@ -386,4 +386,3 @@ export class VocabularyService { } } -/* eslint-enable max-classes-per-file */ diff --git a/src/app/core/tasks/tasks.service.spec.ts b/src/app/core/tasks/tasks.service.spec.ts index 606cf9bb77..ec27ff2ed9 100644 --- a/src/app/core/tasks/tasks.service.spec.ts +++ b/src/app/core/tasks/tasks.service.spec.ts @@ -1,3 +1,4 @@ +/* eslint-disable max-classes-per-file */ import { getTestScheduler } from 'jasmine-marbles'; import { TestScheduler } from 'rxjs/testing'; @@ -25,7 +26,6 @@ import { of } from 'rxjs'; const LINK_NAME = 'test'; -/* eslint-disable max-classes-per-file */ class TestTask extends TaskObject { } @@ -52,7 +52,6 @@ class DummyChangeAnalyzer implements ChangeAnalyzer { } -/* eslint-enable max-classes-per-file */ describe('TasksService', () => { let scheduler: TestScheduler; diff --git a/src/app/core/utilities/equatable.spec.ts b/src/app/core/utilities/equatable.spec.ts index b42f078d98..4fc4ccaf59 100644 --- a/src/app/core/utilities/equatable.spec.ts +++ b/src/app/core/utilities/equatable.spec.ts @@ -1,3 +1,4 @@ +/* eslint-disable max-classes-per-file */ import { excludeFromEquals, fieldsForEquals } from './equals.decorators'; import { EquatableObject } from './equatable'; import { cloneDeep } from 'lodash'; @@ -14,7 +15,6 @@ class Dog extends EquatableObject { public favouriteToy: { name: string, colour: string }; } -// eslint-disable-next-line max-classes-per-file class Owner extends EquatableObject { @excludeFromEquals favouriteFood: string; diff --git a/src/app/item-page/edit-item-page/edit-item-page.component.spec.ts b/src/app/item-page/edit-item-page/edit-item-page.component.spec.ts index 6d60840bfb..f153e9beb9 100644 --- a/src/app/item-page/edit-item-page/edit-item-page.component.spec.ts +++ b/src/app/item-page/edit-item-page/edit-item-page.component.spec.ts @@ -1,3 +1,4 @@ +/* eslint-disable max-classes-per-file */ import { ComponentFixture, fakeAsync, TestBed, waitForAsync } from '@angular/core/testing'; import { TranslateLoader, TranslateModule } from '@ngx-translate/core'; import { TranslateLoaderMock } from '../../shared/mocks/translate-loader.mock'; @@ -19,7 +20,6 @@ describe('ItemPageComponent', () => { } } - // eslint-disable-next-line max-classes-per-file class AcceptNoneGuard implements CanActivate { canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable | Promise | boolean | UrlTree { console.log('BLA'); diff --git a/src/app/item-page/field-components/metadata-field-wrapper/metadata-field-wrapper.component.spec.ts b/src/app/item-page/field-components/metadata-field-wrapper/metadata-field-wrapper.component.spec.ts index 88bb30b9ba..5ef272db3b 100644 --- a/src/app/item-page/field-components/metadata-field-wrapper/metadata-field-wrapper.component.spec.ts +++ b/src/app/item-page/field-components/metadata-field-wrapper/metadata-field-wrapper.component.spec.ts @@ -1,9 +1,9 @@ +/* eslint-disable max-classes-per-file */ import { Component, Input } from '@angular/core'; import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { MetadataFieldWrapperComponent } from './metadata-field-wrapper.component'; -/* eslint-disable max-classes-per-file */ @Component({ selector: 'ds-component-without-content', template: '\n' + @@ -34,7 +34,6 @@ class TextContentComponent { @Input() hideIfNoTextContent = true; } -/* eslint-enable max-classes-per-file */ describe('MetadataFieldWrapperComponent', () => { let component: MetadataFieldWrapperComponent; diff --git a/src/app/my-dspace-page/collection-selector/collection-selector.component.spec.ts b/src/app/my-dspace-page/collection-selector/collection-selector.component.spec.ts index 7bc675bb48..143b42c7f1 100644 --- a/src/app/my-dspace-page/collection-selector/collection-selector.component.spec.ts +++ b/src/app/my-dspace-page/collection-selector/collection-selector.component.spec.ts @@ -1,3 +1,4 @@ +/* eslint-disable max-classes-per-file */ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { ChangeDetectorRef, ElementRef, NO_ERRORS_SCHEMA } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; @@ -94,7 +95,6 @@ describe('CollectionSelectorComponent', () => { }) ]; - // eslint-disable-next-line max-classes-per-file const collectionDataServiceMock = { getAuthorizedCollection(query: string, options: FindListOptions = {}, ...linksToFollow: FollowLinkConfig[]): Observable>> { return hot( 'a|', { diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/existing-metadata-list-element/existing-metadata-list-element.component.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/existing-metadata-list-element/existing-metadata-list-element.component.ts index 60cdfc9d7b..81f9fa6bda 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/existing-metadata-list-element/existing-metadata-list-element.component.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/existing-metadata-list-element/existing-metadata-list-element.component.ts @@ -1,3 +1,4 @@ +/* eslint-disable max-classes-per-file */ import { Component, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output } from '@angular/core'; import { FormControl } from '@angular/forms'; import { DynamicFormArrayGroupModel } from '@ng-dynamic-forms/core'; @@ -22,7 +23,6 @@ import { RemoveRelationshipAction } from '../relation-lookup-modal/relationship. import { SubmissionService } from '../../../../../submission/submission.service'; import { SubmissionObjectEntry } from '../../../../../submission/objects/submission-objects.reducer'; -/* eslint-disable max-classes-per-file */ /** * Abstract class that defines objects that can be reordered */ @@ -218,4 +218,3 @@ export class ExistingMetadataListElementComponent implements OnInit, OnChanges, } -/* eslint-enable max-classes-per-file */ diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/existing-relation-list-element/existing-relation-list-element.component.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/existing-relation-list-element/existing-relation-list-element.component.ts index 4a8259f451..c3a8b157a6 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/existing-relation-list-element/existing-relation-list-element.component.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/existing-relation-list-element/existing-relation-list-element.component.ts @@ -1,3 +1,4 @@ +/* eslint-disable max-classes-per-file */ import { Component, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output } from '@angular/core'; import { Store } from '@ngrx/store'; import { BehaviorSubject, Observable, Subscription } from 'rxjs'; @@ -14,7 +15,6 @@ import { ViewMode } from '../../../../../core/shared/view-mode.model'; import { ReorderableRelationship } from '../existing-metadata-list-element/existing-metadata-list-element.component'; import { SubmissionService } from '../../../../../submission/submission.service'; -/* eslint-disable max-classes-per-file */ /** * Abstract class that defines objects that can be reordered */ @@ -120,4 +120,3 @@ export class ExistingRelationListElementComponent implements OnInit, OnChanges, } -/* eslint-enable max-classes-per-file */ diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/models/onebox/dynamic-onebox.component.spec.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/models/onebox/dynamic-onebox.component.spec.ts index e314d7d31e..1102ae2e74 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/models/onebox/dynamic-onebox.component.spec.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/models/onebox/dynamic-onebox.component.spec.ts @@ -1,3 +1,4 @@ +/* eslint-disable max-classes-per-file */ // Load the implementations that should be tested import { ChangeDetectorRef, Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; import { FormControl, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms'; @@ -34,7 +35,6 @@ export let ONEBOX_TEST_GROUP; export let ONEBOX_TEST_MODEL_CONFIG; -/* eslint-disable max-classes-per-file */ // Mock class for NgbModalRef export class MockNgbModalRef { @@ -463,4 +463,3 @@ class TestComponent { } -/* eslint-enable max-classes-per-file */ diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/name-variant.actions.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/name-variant.actions.ts index f20bc3c537..e1cc49778e 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/name-variant.actions.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/name-variant.actions.ts @@ -1,3 +1,4 @@ +/* eslint-disable max-classes-per-file */ /** * The list of NameVariantAction type definitions */ @@ -9,7 +10,6 @@ export const NameVariantActionTypes = { REMOVE_NAME_VARIANT: type('dspace/name-variant/REMOVE_NAME_VARIANT'), }; -/* eslint-disable max-classes-per-file */ /** * Abstract class for actions that happen to name variants */ @@ -51,7 +51,6 @@ export class RemoveNameVariantAction extends NameVariantListAction { super(listID, itemID); } } -/* eslint-enable max-classes-per-file */ /** * A type to encompass all RelationshipActions diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/relationship.actions.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/relationship.actions.ts index 00770a5b35..fb2271224b 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/relationship.actions.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/relationship.actions.ts @@ -1,3 +1,4 @@ +/* eslint-disable max-classes-per-file */ /** * The list of RelationshipAction type definitions */ @@ -13,7 +14,6 @@ export const RelationshipActionTypes = { UPDATE_RELATIONSHIP: type('dspace/relationship/UPDATE_RELATIONSHIP'), }; -/* eslint-disable max-classes-per-file */ /** * An ngrx action to create a new relationship */ @@ -132,7 +132,6 @@ export class RemoveRelationshipAction implements Action { } } -/* eslint-enable max-classes-per-file */ /** * A type to encompass all RelationshipActions diff --git a/src/app/shared/form/form.actions.ts b/src/app/shared/form/form.actions.ts index fbd42a612e..30885de278 100644 --- a/src/app/shared/form/form.actions.ts +++ b/src/app/shared/form/form.actions.ts @@ -1,3 +1,4 @@ +/* eslint-disable max-classes-per-file */ import { Action } from '@ngrx/store'; import { type } from '../ngrx/type'; @@ -21,7 +22,6 @@ export const FormActionTypes = { FORM_CLEAR_ERRORS: type('dspace/form/FORM_CLEAR_ERRORS'), }; -/* eslint-disable max-classes-per-file */ export class FormInitAction implements Action { type = FormActionTypes.FORM_INIT; payload: { @@ -160,7 +160,6 @@ export class FormClearErrorsAction implements Action { } } -/* eslint-enable max-classes-per-file */ /** * Export a type alias of all actions in this action group diff --git a/src/app/shared/menu/menu.actions.ts b/src/app/shared/menu/menu.actions.ts index bc47b550ed..d0afc332be 100644 --- a/src/app/shared/menu/menu.actions.ts +++ b/src/app/shared/menu/menu.actions.ts @@ -1,3 +1,4 @@ +/* eslint-disable max-classes-per-file */ import { Action } from '@ngrx/store'; import { MenuID } from './initial-menus-state'; import { type } from '../ngrx/type'; @@ -28,7 +29,6 @@ export const MenuActionTypes = { TOGGLE_ACTIVE_SECTION: type('dspace/menu-section/TOGGLE_ACTIVE_SECTION'), }; -/* eslint-disable max-classes-per-file */ // MENU STATE ACTIONS /** @@ -225,4 +225,3 @@ export type MenuAction = | ToggleActiveMenuSectionAction | CollapseMenuPreviewAction | ExpandMenuPreviewAction; -/* eslint-enable max-classes-per-file */ diff --git a/src/app/shared/metadata-representation/metadata-representation.decorator.spec.ts b/src/app/shared/metadata-representation/metadata-representation.decorator.spec.ts index 5bbdd91204..09d4d60532 100644 --- a/src/app/shared/metadata-representation/metadata-representation.decorator.spec.ts +++ b/src/app/shared/metadata-representation/metadata-representation.decorator.spec.ts @@ -1,3 +1,4 @@ + /* eslint-disable max-classes-per-file */ import { DEFAULT_ENTITY_TYPE, DEFAULT_REPRESENTATION_TYPE, @@ -20,7 +21,6 @@ describe('MetadataRepresentation decorator function', () => { const typeUnthemed = 'TestTypeUnthemed'; let prefix; - /* eslint-disable max-classes-per-file */ class Test1PlainText { } diff --git a/src/app/shared/mydspace-actions/claimed-task/switcher/claimed-task-actions-decorator.spec.ts b/src/app/shared/mydspace-actions/claimed-task/switcher/claimed-task-actions-decorator.spec.ts index 2aa19d3c48..3630c7ea0c 100644 --- a/src/app/shared/mydspace-actions/claimed-task/switcher/claimed-task-actions-decorator.spec.ts +++ b/src/app/shared/mydspace-actions/claimed-task/switcher/claimed-task-actions-decorator.spec.ts @@ -1,3 +1,4 @@ + /* eslint-disable max-classes-per-file */ import { getComponentByWorkflowTaskOption, rendersWorkflowTaskOption } from './claimed-task-actions-decorator'; describe('ClaimedTaskActions decorator function', () => { @@ -5,7 +6,6 @@ describe('ClaimedTaskActions decorator function', () => { const option2 = 'test_option_2'; const option3 = 'test_option_3'; - /* eslint-disable max-classes-per-file */ class Test1Action { } diff --git a/src/app/shared/notifications/notifications.actions.ts b/src/app/shared/notifications/notifications.actions.ts index e4b3066639..bf47ee3ad7 100644 --- a/src/app/shared/notifications/notifications.actions.ts +++ b/src/app/shared/notifications/notifications.actions.ts @@ -1,3 +1,4 @@ +/* eslint-disable max-classes-per-file */ import { Action } from '@ngrx/store'; import { type } from '../ngrx/type'; import { INotification } from './models/notification.model'; @@ -8,7 +9,6 @@ export const NotificationsActionTypes = { REMOVE_NOTIFICATION: type('dspace/notifications/REMOVE_NOTIFICATION'), }; -/* eslint-disable max-classes-per-file */ /** * New notification. @@ -49,7 +49,6 @@ export class RemoveNotificationAction implements Action { } } -/* eslint-enable max-classes-per-file */ /** * Actions type. diff --git a/src/app/shared/notifications/notifications.reducers.ts b/src/app/shared/notifications/notifications.reducers.ts index c5afef416b..f64cd891eb 100644 --- a/src/app/shared/notifications/notifications.reducers.ts +++ b/src/app/shared/notifications/notifications.reducers.ts @@ -4,6 +4,7 @@ import { INotification } from './models/notification.model'; /** * The notification state. */ +// eslint-disable-next-line @typescript-eslint/no-empty-interface export interface NotificationsState extends Array { } diff --git a/src/app/shared/object-collection/shared/listable-object/listable-object.decorator.spec.ts b/src/app/shared/object-collection/shared/listable-object/listable-object.decorator.spec.ts index 2a5767d345..7475aac967 100644 --- a/src/app/shared/object-collection/shared/listable-object/listable-object.decorator.spec.ts +++ b/src/app/shared/object-collection/shared/listable-object/listable-object.decorator.spec.ts @@ -1,3 +1,4 @@ + /* eslint-disable max-classes-per-file */ import { Item } from '../../../../core/shared/item.model'; import { ViewMode } from '../../../../core/shared/view-mode.model'; import { getListableObjectComponent, listableObjectComponent } from './listable-object.decorator'; @@ -13,7 +14,6 @@ describe('ListableObject decorator function', () => { const typeAncestor = 'TestTypeAncestor'; const typeUnthemed = 'TestTypeUnthemed'; - /* eslint-disable max-classes-per-file */ class Test1List { } diff --git a/src/app/shared/object-list/selectable-list/selectable-list.actions.ts b/src/app/shared/object-list/selectable-list/selectable-list.actions.ts index e6a0263d38..9aa7d46543 100644 --- a/src/app/shared/object-list/selectable-list/selectable-list.actions.ts +++ b/src/app/shared/object-list/selectable-list/selectable-list.actions.ts @@ -1,3 +1,4 @@ +/* eslint-disable max-classes-per-file */ import { Action } from '@ngrx/store'; import { type } from '../../ngrx/type'; import { ListableObject } from '../../object-collection/shared/listable-object.model'; @@ -22,7 +23,6 @@ export const SelectableListActionTypes = { /** * Abstract action class for actions on selectable lists */ -/* eslint-disable max-classes-per-file */ export abstract class SelectableListAction implements Action { // eslint-disable-next-line @typescript-eslint/no-shadow constructor(public type, public id: string) { @@ -98,4 +98,3 @@ export class SelectableListDeselectAllAction extends SelectableListAction { super(SelectableListActionTypes.DESELECT_ALL, id); } } -/* eslint-enable max-classes-per-file */ diff --git a/src/app/shared/object-list/selectable-list/selectable-list.reducer.spec.ts b/src/app/shared/object-list/selectable-list/selectable-list.reducer.spec.ts index 4b50817c74..052caad62d 100644 --- a/src/app/shared/object-list/selectable-list/selectable-list.reducer.spec.ts +++ b/src/app/shared/object-list/selectable-list/selectable-list.reducer.spec.ts @@ -1,3 +1,4 @@ +/* eslint-disable max-classes-per-file */ import { SelectableListAction, SelectableListDeselectAction, @@ -11,7 +12,6 @@ import { selectableListReducer } from './selectable-list.reducer'; import { ListableObject } from '../../object-collection/shared/listable-object.model'; import { hasValue } from '../../empty.util'; -/* eslint-disable max-classes-per-file */ class SelectableObject extends ListableObject { constructor(private value: string) { super(); @@ -34,7 +34,6 @@ class NullAction extends SelectableListAction { } } -/* eslint-enable max-classes-per-file */ const listID1 = 'id1'; const listID2 = 'id2'; const value1 = 'Selected object'; diff --git a/src/app/shared/object-select/object-select.actions.ts b/src/app/shared/object-select/object-select.actions.ts index 770f1abf26..a8c50ef55d 100644 --- a/src/app/shared/object-select/object-select.actions.ts +++ b/src/app/shared/object-select/object-select.actions.ts @@ -1,3 +1,4 @@ +/* eslint-disable max-classes-per-file */ import { type } from '../ngrx/type'; import { Action } from '@ngrx/store'; @@ -37,7 +38,6 @@ export class ObjectSelectionAction implements Action { } } -/* eslint-disable max-classes-per-file */ /** * Used to set the initial state to deselected */ @@ -79,4 +79,3 @@ export class ObjectSelectionSwitchAction extends ObjectSelectionAction { export class ObjectSelectionResetAction extends ObjectSelectionAction { type = ObjectSelectionActionTypes.RESET; } -/* eslint-enable max-classes-per-file */ diff --git a/src/app/shared/search/search-filters/search-filter/search-filter.actions.ts b/src/app/shared/search/search-filters/search-filter/search-filter.actions.ts index 167d03cf92..e1c8446b3c 100644 --- a/src/app/shared/search/search-filters/search-filter/search-filter.actions.ts +++ b/src/app/shared/search/search-filters/search-filter/search-filter.actions.ts @@ -1,3 +1,4 @@ +/* eslint-disable max-classes-per-file */ import { Action } from '@ngrx/store'; import { type } from '../../../ngrx/type'; @@ -41,7 +42,6 @@ export class SearchFilterAction implements Action { } } -/* eslint-disable max-classes-per-file */ /** * Used to collapse a filter */ @@ -95,4 +95,3 @@ export class SearchFilterIncrementPageAction extends SearchFilterAction { export class SearchFilterResetPageAction extends SearchFilterAction { type = SearchFilterActionTypes.RESET_PAGE; } -/* eslint-enable max-classes-per-file */ diff --git a/src/app/shared/sidebar/filter/sidebar-filter.actions.ts b/src/app/shared/sidebar/filter/sidebar-filter.actions.ts index 2f723e22ff..5dab677c5c 100644 --- a/src/app/shared/sidebar/filter/sidebar-filter.actions.ts +++ b/src/app/shared/sidebar/filter/sidebar-filter.actions.ts @@ -1,3 +1,4 @@ +/* eslint-disable max-classes-per-file */ import { Action } from '@ngrx/store'; import { type } from '../../ngrx/type'; @@ -37,7 +38,6 @@ export class SidebarFilterAction implements Action { } } -/* eslint-disable max-classes-per-file */ /** * Used to initialize a filter */ @@ -71,4 +71,3 @@ export class FilterExpandAction extends SidebarFilterAction { export class FilterToggleAction extends SidebarFilterAction { type = SidebarFilterActionTypes.TOGGLE; } -/* eslint-enable max-classes-per-file */ diff --git a/src/app/shared/sidebar/sidebar-effects.service.ts b/src/app/shared/sidebar/sidebar-effects.service.ts index 191b21b4cf..ba53e2fec9 100644 --- a/src/app/shared/sidebar/sidebar-effects.service.ts +++ b/src/app/shared/sidebar/sidebar-effects.service.ts @@ -27,10 +27,9 @@ export class SidebarEffects { } getBaseUrl(action: any): string { - /* eslint-disable @typescript-eslint/dot-notation */ + /* eslint-disable-next-line @typescript-eslint/dot-notation */ const url: string = action['payload'].routerState.url; return new URLBaser(url).toString(); - /* eslint-enable @typescript-eslint/dot-notation */ } } diff --git a/src/app/shared/sidebar/sidebar.actions.ts b/src/app/shared/sidebar/sidebar.actions.ts index c415ca4fc2..f9d243223d 100644 --- a/src/app/shared/sidebar/sidebar.actions.ts +++ b/src/app/shared/sidebar/sidebar.actions.ts @@ -1,3 +1,4 @@ +/* eslint-disable max-classes-per-file */ import { Action } from '@ngrx/store'; import { type } from '../ngrx/type'; @@ -16,7 +17,6 @@ export const SidebarActionTypes = { TOGGLE: type('dspace/sidebar/TOGGLE') }; -/* eslint-disable max-classes-per-file */ /** * Used to collapse the sidebar */ @@ -37,7 +37,6 @@ export class SidebarExpandAction implements Action { export class SidebarToggleAction implements Action { type = SidebarActionTypes.TOGGLE; } -/* eslint-enable max-classes-per-file */ /** * Export a type alias of all actions in this action group diff --git a/src/app/shared/theme-support/themed.component.spec.ts b/src/app/shared/theme-support/themed.component.spec.ts index 4a5f95581e..404e970a7a 100644 --- a/src/app/shared/theme-support/themed.component.spec.ts +++ b/src/app/shared/theme-support/themed.component.spec.ts @@ -1,3 +1,4 @@ +/* eslint-disable max-classes-per-file */ import { ThemedComponent } from './themed.component'; import { Component, NO_ERRORS_SCHEMA } from '@angular/core'; import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; @@ -7,7 +8,6 @@ import { getMockThemeService } from '../mocks/theme-service.mock'; import { TestComponent } from './test/test.component.spec'; import { ThemeConfig } from '../../../config/theme.model'; -/* eslint-disable max-classes-per-file */ @Component({ selector: 'ds-test-themed-component', templateUrl: './themed.component.html' @@ -197,4 +197,3 @@ describe('ThemedComponent', () => { }); }); }); -/* eslint-enable max-classes-per-file */ diff --git a/src/app/shared/truncatable/truncatable.actions.ts b/src/app/shared/truncatable/truncatable.actions.ts index 579dc687de..cd9a92f935 100644 --- a/src/app/shared/truncatable/truncatable.actions.ts +++ b/src/app/shared/truncatable/truncatable.actions.ts @@ -1,3 +1,4 @@ +/* eslint-disable max-classes-per-file */ import { Action } from '@ngrx/store'; import { type } from '../ngrx/type'; @@ -35,7 +36,6 @@ export class TruncatableAction implements Action { } } -/* eslint-disable max-classes-per-file */ /** * Used to collapse a truncatable component when it's expanded and expand it when it's collapsed */ @@ -57,4 +57,3 @@ export class TruncatableExpandAction extends TruncatableAction { type = TruncatableActionTypes.EXPAND; } -/* eslint-enable max-classes-per-file */ diff --git a/src/app/shared/vocabulary-treeview/vocabulary-treeview-node.model.ts b/src/app/shared/vocabulary-treeview/vocabulary-treeview-node.model.ts index 25315e0d27..63039e6c75 100644 --- a/src/app/shared/vocabulary-treeview/vocabulary-treeview-node.model.ts +++ b/src/app/shared/vocabulary-treeview/vocabulary-treeview-node.model.ts @@ -1,3 +1,4 @@ +/* eslint-disable max-classes-per-file */ import { BehaviorSubject } from 'rxjs'; import { VocabularyEntryDetail } from '../../core/submission/vocabularies/models/vocabulary-entry-detail.model'; import { PageInfo } from '../../core/shared/page-info.model'; @@ -7,7 +8,6 @@ export const LOAD_MORE_ROOT = 'LOAD_MORE_ROOT'; export const LOAD_MORE_NODE: any = { id: LOAD_MORE }; export const LOAD_MORE_ROOT_NODE: any = { id: LOAD_MORE_ROOT }; -/* eslint-disable max-classes-per-file */ /** Nested node */ export class TreeviewNode { childrenChange = new BehaviorSubject([]); @@ -42,4 +42,3 @@ export class TreeviewFlatNode { } } -/* eslint-enable max-classes-per-file */ diff --git a/src/app/submission/objects/submission-objects.actions.ts b/src/app/submission/objects/submission-objects.actions.ts index ceb759bbbc..4709133818 100644 --- a/src/app/submission/objects/submission-objects.actions.ts +++ b/src/app/submission/objects/submission-objects.actions.ts @@ -1,3 +1,4 @@ +/* eslint-disable max-classes-per-file */ import { Action } from '@ngrx/store'; import { type } from '../../shared/ngrx/type'; @@ -64,7 +65,6 @@ export const SubmissionObjectActionTypes = { REMOVE_SECTION_ERRORS: type('dspace/submission/REMOVE_SECTION_ERRORS'), }; -/* eslint-disable max-classes-per-file */ /** * Insert a new error of type SubmissionSectionError into the given section @@ -802,7 +802,6 @@ export class DeleteUploadedFileAction implements Action { } } -/* eslint-enable max-classes-per-file */ /** * Export a type alias of all actions in this action group diff --git a/src/config/config.server.ts b/src/config/config.server.ts index 986fc2a092..11b75a5211 100644 --- a/src/config/config.server.ts +++ b/src/config/config.server.ts @@ -105,6 +105,7 @@ const overrideWithConfig = (config: Config, pathToConfig: string) => { }; const overrideWithEnvironment = (config: Config, key: string = '') => { + // eslint-disable-next-line guard-for-in for (const property in config) { const variable = `${key}${isNotEmpty(key) ? '_' : ''}${property.toUpperCase()}`; const innerConfig = config[property]; diff --git a/src/config/theme.model.ts b/src/config/theme.model.ts index 5cdd8200b2..b7654b1fd7 100644 --- a/src/config/theme.model.ts +++ b/src/config/theme.model.ts @@ -1,9 +1,9 @@ +/* eslint-disable max-classes-per-file */ import { Config } from './config.interface'; import { hasValue, hasNoValue, isNotEmpty } from '../app/shared/empty.util'; import { DSpaceObject } from '../app/core/shared/dspace-object.model'; import { getDSORoute } from '../app/app-routing-paths'; -/* eslint-disable max-classes-per-file */ export interface NamedThemeConfig extends Config { name: string;