From ae0e115dd1e58e3f2b6a5c13f179bd55e675241e Mon Sep 17 00:00:00 2001 From: Neemys <36508659+Neemys@users.noreply.github.com> Date: Thu, 28 Jul 2022 16:50:43 +0200 Subject: [PATCH] Inline a type in useProjectKey in sonarqube plugin Type used only used and referenced in one place Signed-off-by: Neemys <36508659+Neemys@users.noreply.github.com> --- plugins/sonarqube/src/components/useProjectKey.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/sonarqube/src/components/useProjectKey.ts b/plugins/sonarqube/src/components/useProjectKey.ts index acf28c7802..fbe12b5b5d 100644 --- a/plugins/sonarqube/src/components/useProjectKey.ts +++ b/plugins/sonarqube/src/components/useProjectKey.ts @@ -16,11 +16,6 @@ import { Entity } from '@backstage/catalog-model'; -export interface ProjectInfo { - projectInstance: string; - projectKey: string; -} - export const SONARQUBE_PROJECT_KEY_ANNOTATION = 'sonarqube.org/project-key'; export const SONARQUBE_PROJECT_INSTANCE_SEPARATOR = '/'; @@ -35,7 +30,12 @@ export const isSonarQubeAvailable = (entity: Entity) => * @param entity entity to find the sonarqube information from. * @return a ProjectInfo properly populated. */ -export const useProjectInfo = (entity: Entity): ProjectInfo => { +export const useProjectInfo = ( + entity: Entity, +): { + projectInstance: string; + projectKey: string; +} => { let projectInstance = ''; let projectKey = ''; const annotation =