Skip to content

Commit

Permalink
refactor: Enforce mentioning of lifecycle hook interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
MoritzWeber0 committed Feb 7, 2024
1 parent c808389 commit 304590a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions frontend/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ module.exports = {
"unused-imports/no-unused-imports": "error",
"no-console": ["error", { allow: ["error"] }],
"deprecation/deprecation": "warn",
"@angular-eslint/use-lifecycle-interface": "error",
},
},
{
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/app/helpers/editor/editor.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
HostListener,
Input,
NgZone,
OnInit,
Output,
} from '@angular/core';

Expand All @@ -22,7 +23,7 @@ import { stringify, parse, YAMLParseError } from 'yaml';
selector: 'app-editor',
templateUrl: './editor.component.html',
})
export class EditorComponent {
export class EditorComponent implements OnInit {
private editor?: monaco.editor.IStandaloneCodeEditor = undefined;
intialValue = 'Loading...';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import { Component } from '@angular/core';
import { Component, OnInit } from '@angular/core';
import { MatDialog } from '@angular/material/dialog';
import { ActivatedRoute, Router } from '@angular/router';
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
Expand All @@ -24,7 +24,7 @@ import {
templateUrl: './project-metadata.component.html',
styleUrls: ['./project-metadata.component.css'],
})
export class ProjectMetadataComponent {
export class ProjectMetadataComponent implements OnInit {
project?: Project;
canDelete = false;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
*/

import {
AfterViewInit,
Component,
ElementRef,
Inject,
OnInit,
QueryList,
ViewChildren,
} from '@angular/core';
Expand All @@ -20,7 +22,7 @@ import { ProjectAuditLogService } from 'src/app/projects/project-detail/project-
styleUrls: ['./project-audit-log.component.css'],
})
@UntilDestroy()
export class ProjectAuditLogComponent {
export class ProjectAuditLogComponent implements OnInit, AfterViewInit {
pageSize = 25;
pageSizeArray = [...Array(this.pageSize).keys()];

Expand Down

0 comments on commit 304590a

Please sign in to comment.