mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
Merge pull request #4329 from 4Science/task/main/DURACOM-368
Enforce standalone components/directives/pipes via linting
This commit is contained in:
@@ -160,6 +160,9 @@
|
||||
]
|
||||
}
|
||||
],
|
||||
"@angular-eslint/prefer-standalone": [
|
||||
"error"
|
||||
],
|
||||
"@angular-eslint/no-attribute-decorator": "error",
|
||||
"@angular-eslint/no-output-native": "warn",
|
||||
"@angular-eslint/no-output-on-prefix": "warn",
|
||||
|
@@ -20,6 +20,7 @@ import { BrowseByPageComponent } from './browse-by-page.component';
|
||||
@Component({
|
||||
// eslint-disable-next-line @angular-eslint/component-selector
|
||||
selector: '',
|
||||
standalone: true,
|
||||
template: '<span id="BrowseByTestComponent"></span>',
|
||||
})
|
||||
class BrowseByTestComponent {
|
||||
|
@@ -20,6 +20,7 @@ import { BrowseBySwitcherComponent } from './browse-by-switcher.component';
|
||||
@Component({
|
||||
// eslint-disable-next-line @angular-eslint/component-selector
|
||||
selector: '',
|
||||
standalone: true,
|
||||
template: '<span id="BrowseByTestComponent"></span>',
|
||||
})
|
||||
class BrowseByTestComponent {
|
||||
|
@@ -10,6 +10,7 @@ import {
|
||||
*/
|
||||
@Component({
|
||||
selector: 'ds-value-input',
|
||||
standalone: true,
|
||||
template: '',
|
||||
})
|
||||
export abstract class ValueInputComponent<T> {
|
||||
|
@@ -58,6 +58,7 @@ import { BrowseByComponent } from './browse-by.component';
|
||||
@Component({
|
||||
// eslint-disable-next-line @angular-eslint/component-selector
|
||||
selector: 'ds-browse-entry-list-element',
|
||||
standalone: true,
|
||||
template: '',
|
||||
})
|
||||
class MockThemedBrowseEntryListElementComponent {
|
||||
|
@@ -23,6 +23,7 @@ import { ComcolBrowseByComponent } from './comcol-browse-by.component';
|
||||
@Component({
|
||||
// eslint-disable-next-line @angular-eslint/component-selector
|
||||
selector: '',
|
||||
standalone: true,
|
||||
template: '<span id="ComcolBrowseByComponent"></span>',
|
||||
})
|
||||
class BrowseByTestComponent {
|
||||
|
@@ -11,9 +11,13 @@ import { By } from '@angular/platform-browser';
|
||||
import { BtnDisabledDirective } from './btn-disabled.directive';
|
||||
|
||||
@Component({
|
||||
standalone: true,
|
||||
template: `
|
||||
<button [dsBtnDisabled]="isDisabled">Test Button</button>
|
||||
`,
|
||||
imports: [
|
||||
BtnDisabledDirective,
|
||||
],
|
||||
})
|
||||
class TestComponent {
|
||||
isDisabled = false;
|
||||
@@ -26,8 +30,7 @@ describe('DisabledDirective', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [BtnDisabledDirective],
|
||||
declarations: [TestComponent],
|
||||
imports: [BtnDisabledDirective, TestComponent],
|
||||
});
|
||||
fixture = TestBed.createComponent(TestComponent);
|
||||
component = fixture.componentInstance;
|
||||
|
@@ -34,6 +34,7 @@ export enum SelectorActionType {
|
||||
*/
|
||||
@Component({
|
||||
selector: 'ds-dso-selector-modal',
|
||||
standalone: true,
|
||||
template: '',
|
||||
})
|
||||
export abstract class DSOSelectorModalWrapperComponent implements OnInit {
|
||||
|
@@ -28,6 +28,7 @@ import { DsDynamicInputModel } from './ds-dynamic-input.model';
|
||||
*/
|
||||
@Component({
|
||||
selector: 'ds-dynamic-vocabulary',
|
||||
standalone: true,
|
||||
template: '',
|
||||
})
|
||||
export abstract class DsDynamicVocabularyComponent extends DynamicFormControlComponent {
|
||||
|
@@ -27,6 +27,7 @@ import { ClaimedTaskActionsAbstractComponent } from './claimed-task-actions-abst
|
||||
*/
|
||||
@Component({
|
||||
selector: 'ds-advanced-claimed-task-action-abstract',
|
||||
standalone: true,
|
||||
template: '',
|
||||
})
|
||||
export abstract class AdvancedClaimedTaskActionsAbstractComponent extends ClaimedTaskActionsAbstractComponent implements OnInit {
|
||||
|
@@ -31,6 +31,7 @@ import { MyDSpaceReloadableActionsComponent } from '../../mydspace-reloadable-ac
|
||||
*/
|
||||
@Component({
|
||||
selector: 'ds-claimed-task-action-abstract',
|
||||
standalone: true,
|
||||
template: '',
|
||||
})
|
||||
export abstract class ClaimedTaskActionsAbstractComponent extends MyDSpaceReloadableActionsComponent<ClaimedTask, ClaimedTaskDataService> implements OnDestroy {
|
||||
|
@@ -37,6 +37,7 @@ export interface MyDSpaceActionsResult {
|
||||
*/
|
||||
@Component({
|
||||
selector: 'ds-mydspace-actions-abstract',
|
||||
standalone: true,
|
||||
template: '',
|
||||
})
|
||||
export abstract class MyDSpaceActionsComponent<T extends DSpaceObject, TService extends IdentifiableDataService<T>> {
|
||||
|
@@ -34,6 +34,7 @@ import { MyDSpaceActionsComponent } from './mydspace-actions';
|
||||
*/
|
||||
@Component({
|
||||
selector: 'ds-mydspace-reloadable-actions',
|
||||
standalone: true,
|
||||
template: '',
|
||||
})
|
||||
export abstract class MyDSpaceReloadableActionsComponent<T extends DSpaceObject, TService extends IdentifiableDataService<T>>
|
||||
|
@@ -30,6 +30,7 @@ import { ObjectSelectService } from '../object-select.service';
|
||||
*/
|
||||
@Component({
|
||||
selector: 'ds-object-select-abstract',
|
||||
standalone: true,
|
||||
template: '',
|
||||
})
|
||||
export abstract class ObjectSelectComponent<TDomain extends DSpaceObject> implements OnInit, OnDestroy {
|
||||
|
@@ -23,6 +23,7 @@ import { StartsWithType } from './starts-with-type';
|
||||
*/
|
||||
@Component({
|
||||
selector: 'ds-start-with-abstract',
|
||||
standalone: true,
|
||||
template: '',
|
||||
})
|
||||
export abstract class StartsWithAbstractComponent implements OnInit, OnDestroy {
|
||||
|
@@ -3,6 +3,7 @@ import { Component } from '@angular/core';
|
||||
// noinspection AngularMissingOrInvalidDeclarationInModule
|
||||
@Component({
|
||||
selector: 'ds-test-component',
|
||||
standalone: true,
|
||||
template: '',
|
||||
})
|
||||
export class TestComponent {
|
||||
|
@@ -3,6 +3,7 @@ import { Component } from '@angular/core';
|
||||
// noinspection AngularMissingOrInvalidDeclarationInModule
|
||||
@Component({
|
||||
selector: 'ds-test-component',
|
||||
standalone: true,
|
||||
template: '',
|
||||
})
|
||||
export class TestComponent {
|
||||
|
@@ -37,6 +37,7 @@ import { ThemeService } from './theme.service';
|
||||
|
||||
@Component({
|
||||
selector: 'ds-themed',
|
||||
standalone: true,
|
||||
styleUrls: ['./themed.component.scss'],
|
||||
templateUrl: './themed.component.html',
|
||||
})
|
||||
|
@@ -29,6 +29,7 @@ export interface SectionDataModel {
|
||||
*/
|
||||
@Component({
|
||||
selector: 'ds-section-model',
|
||||
standalone: true,
|
||||
template: '',
|
||||
})
|
||||
export abstract class SectionModelComponent implements OnDestroy, OnInit, SectionDataModel {
|
||||
|
@@ -30,6 +30,7 @@ import { WorkflowItemActionPageDirective } from '../../workflow-item-action-page
|
||||
*/
|
||||
@Component({
|
||||
selector: 'ds-advanced-workflow-action',
|
||||
standalone: true,
|
||||
template: '',
|
||||
})
|
||||
export abstract class AdvancedWorkflowActionComponent extends WorkflowItemActionPageDirective implements OnInit {
|
||||
|
Reference in New Issue
Block a user