From 250b6f04f804317459ed098d139062466e5ceca8 Mon Sep 17 00:00:00 2001 From: Lucas De Souza Date: Mon, 21 Nov 2022 15:40:56 -0600 Subject: [PATCH] run prettier Signed-off-by: Lucas De Souza --- app-config.yaml | 12 ++++++------ .../src/ingestion/CatalogRules.test.ts | 2 +- .../src/ingestion/CatalogRules.ts | 16 ++++++++-------- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/app-config.yaml b/app-config.yaml index dd72051189..c0f5767a45 100644 --- a/app-config.yaml +++ b/app-config.yaml @@ -212,12 +212,12 @@ catalog: pullRequestBranchName: backstage-integration rules: - allow: - - Component - - API - - Resource - - System - - Domain - - Location + - Component + - API + - Resource + - System + - Domain + - Location processors: ldapOrg: diff --git a/plugins/catalog-backend/src/ingestion/CatalogRules.test.ts b/plugins/catalog-backend/src/ingestion/CatalogRules.test.ts index c9e0f7c619..f4b9f5ea59 100644 --- a/plugins/catalog-backend/src/ingestion/CatalogRules.test.ts +++ b/plugins/catalog-backend/src/ingestion/CatalogRules.test.ts @@ -225,7 +225,7 @@ describe('DefaultCatalogRulesEnforcer', () => { const enforcer = DefaultCatalogRulesEnforcer.fromConfig( new ConfigReader({ catalog: { - rules: [{ allow: ['Component'], locations: [{type: 'url', match: 'https://github.com/b/*'}] }], + rules: [{ allow: ['Component'], locations: [{ type: 'url', match: 'https://github.com/b/*' }] }], }, }), ); diff --git a/plugins/catalog-backend/src/ingestion/CatalogRules.ts b/plugins/catalog-backend/src/ingestion/CatalogRules.ts index 43d865c4d2..0d013dc78b 100644 --- a/plugins/catalog-backend/src/ingestion/CatalogRules.ts +++ b/plugins/catalog-backend/src/ingestion/CatalogRules.ts @@ -99,13 +99,13 @@ export class DefaultCatalogRulesEnforcer implements CatalogRulesEnforcer { }; const locConf = ruleConfig.getOptionalConfigArray('locations'); - if (locConf) - rule.locations = locConf.map( locationConfig => ({ - match: locationConfig.getOptionalString('match'), - type: locationConfig.getString('type'), - target: locationConfig.getOptionalString('target') - })) - + if (locConf) + rule.locations = locConf.map(locationConfig => ({ + match: locationConfig.getOptionalString('match'), + type: locationConfig.getString('type'), + target: locationConfig.getOptionalString('target') + })) + return rule; }); rules.push(...globalRules); @@ -135,7 +135,7 @@ export class DefaultCatalogRulesEnforcer implements CatalogRulesEnforcer { return new DefaultCatalogRulesEnforcer(rules); } - constructor(private readonly rules: CatalogRule[]) {} + constructor(private readonly rules: CatalogRule[]) { } /** * Checks whether a specific entity/location combination is allowed