Skip to content

Commit

Permalink
Fix typescript-eslint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
shu-mutou committed Oct 8, 2024
1 parent e1e9ddf commit d956d4d
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 5 deletions.
5 changes: 5 additions & 0 deletions modules/web/.eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ rules:
"@typescript-eslint/no-unused-vars":
- error
- argsIgnorePattern: "^_"
caughtErrors: none
"@typescript-eslint/no-unused-expressions":
- error
- allowTernary: true
"@typescript-eslint/no-unsafe-function-type": off
"@typescript-eslint/ban-ts-comment": warn
"@typescript-eslint/no-non-null-assertion": off
"@typescript-eslint/no-use-before-define": off
Expand Down
2 changes: 1 addition & 1 deletion modules/web/src/common/dialogs/editresource/dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export class EditResourceDialogComponent implements OnInit {
}
}

private toRawJSON(object: {}): string {
private toRawJSON(object: unknown): string {
return JSON.stringify(object, null, '\t');
}
}
2 changes: 1 addition & 1 deletion modules/web/src/common/dialogs/previewdeployment/dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export class PreviewDeploymentDialogComponent implements OnInit {
};
}

private toRawJSON(object: {}): string {
private toRawJSON(object: unknown): string {
return JSON.stringify(object, null, '\t');
}
}
2 changes: 1 addition & 1 deletion modules/web/src/common/services/global/loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export class LocalConfigLoaderService {
return this.appConfig_;
}

init(): Promise<{}> {
init(): Promise<object> {
return lastValueFrom(
this.http_.get('assets/config/config.json').pipe(tap(response => (this.appConfig_ = response as AppConfig)))
);
Expand Down
2 changes: 1 addition & 1 deletion modules/web/src/crd/crdobject/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export class CRDObjectDetailComponent implements OnInit, OnDestroy {
}
}

private toRawJSON_(object: {}): string {
private toRawJSON_(object: unknown): string {
return JSON.stringify(object, null, '\t');
}
}
2 changes: 1 addition & 1 deletion modules/web/src/typings/volume.api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export class EphemeralVolumeSource implements IVolumeSource {
// TODO: Populate this with the ephemeral volume's PVC details
displayName = '-';
name: string;
volumeClaimTemplate?: {};
volumeClaimTemplate?: object;
}

export class HostPathVolumeSource implements IVolumeSource {
Expand Down

0 comments on commit d956d4d

Please sign in to comment.