From 7a11677313d799cb4bb9355e01981163be2de7ec Mon Sep 17 00:00:00 2001 From: madalynrose Date: Mon, 29 Aug 2022 08:26:14 -0700 Subject: [PATCH 1/7] add rule-based-view-model-provider --- src/common/rule-based-view-model-provider.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/common/rule-based-view-model-provider.ts b/src/common/rule-based-view-model-provider.ts index 4e39313cd25..2fc0eeb2b8a 100644 --- a/src/common/rule-based-view-model-provider.ts +++ b/src/common/rule-based-view-model-provider.ts @@ -18,13 +18,13 @@ export type GetCardViewData = ( rules: UnifiedRule[], results: UnifiedResult[], cardSelectionViewData: CardSelectionViewData, -) => CardsViewModel; +) => (CardsViewModel | null); export const getCardViewData: GetCardViewData = ( rules: UnifiedRule[], results: UnifiedResult[], cardSelectionViewData: CardSelectionViewData, -): CardsViewModel => { +): (CardsViewModel | null) => { if (results == null || rules == null || cardSelectionViewData == null) { return null; } @@ -37,7 +37,7 @@ export const getCardViewData: GetCardViewData = ( const isInstanceDisplayed = result.status === 'fail' || result.status === 'unknown'; let ruleResult = getExistingRuleFromResults(result.ruleId, ruleResults); - if (!ruleResult) { + if (ruleResult == null) { const rule = getUnifiedRule(result.ruleId, rules); if (!rule) { continue; @@ -77,7 +77,7 @@ export const getCardViewData: GetCardViewData = ( const getExistingRuleFromResults = ( ruleId: string, ruleResults: CardRuleResult[], -): CardRuleResult => { +): CardRuleResult | null => { const ruleResultIndex: number = getRuleResultIndex(ruleId, ruleResults); return ruleResultIndex !== -1 ? ruleResults[ruleResultIndex] : null; @@ -132,7 +132,7 @@ const createCardResult = ( }; }; -const getUnifiedRule = (id: string, rules: UnifiedRule[]): UnifiedRule => +const getUnifiedRule = (id: string, rules: UnifiedRule[]): UnifiedRule | undefined => rules.find(rule => rule.id === id); const getRuleResultIndex = (ruleId: string, ruleResults: CardRuleResult[]): number => From 5221bcf58bd72ca89837824235096b07c45b9453 Mon Sep 17 00:00:00 2001 From: madalynrose Date: Mon, 29 Aug 2022 09:59:56 -0700 Subject: [PATCH 2/7] update TabStoreData to accept undefined values for url, title, and id --- .../components/save-assessment-button-factory.tsx | 2 +- src/background/stores/tab-store.ts | 3 --- src/common/types/store-data/tab-store-data.ts | 6 +++--- .../__snapshots__/details-view-body.test.tsx.snap | 9 --------- 4 files changed, 4 insertions(+), 16 deletions(-) diff --git a/src/DetailsView/components/save-assessment-button-factory.tsx b/src/DetailsView/components/save-assessment-button-factory.tsx index 541ceb7b57a..824aa835a1d 100644 --- a/src/DetailsView/components/save-assessment-button-factory.tsx +++ b/src/DetailsView/components/save-assessment-button-factory.tsx @@ -33,7 +33,7 @@ export function getSaveButtonForAssessment(props: SaveAssessmentButtonFactoryPro const currentDate = props.deps.getCurrentDate(); const fileDate = props.deps.fileNameBuilder.getDateSegment(currentDate); - const targetPageTitle = props.tabStoreData.title; + const targetPageTitle = props.tabStoreData.title || ''; const fileTitle = props.deps.fileNameBuilder.getTitleSegment(targetPageTitle); const fileName = `SavedAssessment_${fileDate}_${fileTitle}.a11ywebassessment`; const fileURL = props.deps.fileURLProvider.provideURL([assessmentData], 'application/json'); diff --git a/src/background/stores/tab-store.ts b/src/background/stores/tab-store.ts index c16da90a995..15954eb3a73 100644 --- a/src/background/stores/tab-store.ts +++ b/src/background/stores/tab-store.ts @@ -40,9 +40,6 @@ export class TabStore extends PersistentStore { public getDefaultState(): TabStoreData { const defaultValues: TabStoreData = { - url: null, - title: null, - id: null, isClosed: false, isChanged: false, isPageHidden: false, diff --git a/src/common/types/store-data/tab-store-data.ts b/src/common/types/store-data/tab-store-data.ts index 67c6e94010c..77293444e76 100644 --- a/src/common/types/store-data/tab-store-data.ts +++ b/src/common/types/store-data/tab-store-data.ts @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. export interface TabStoreData { - url: string; - title: string; - id: number; + url?: string; + title?: string; + id?: number; isClosed: boolean; isChanged: boolean; isPageHidden: boolean; diff --git a/src/tests/unit/tests/DetailsView/__snapshots__/details-view-body.test.tsx.snap b/src/tests/unit/tests/DetailsView/__snapshots__/details-view-body.test.tsx.snap index 2d3816ffa10..48016dcef88 100644 --- a/src/tests/unit/tests/DetailsView/__snapshots__/details-view-body.test.tsx.snap +++ b/src/tests/unit/tests/DetailsView/__snapshots__/details-view-body.test.tsx.snap @@ -131,13 +131,10 @@ exports[`DetailsViewBody render render 1`] = ` } tabStoreData={ Object { - "id": null, "isChanged": false, "isClosed": false, "isOriginChanged": false, "isPageHidden": false, - "title": null, - "url": null, } } visualizationConfigurationFactory={Object {}} @@ -467,13 +464,10 @@ exports[`DetailsViewBody render render 1`] = ` } tabStoreData={ Object { - "id": null, "isChanged": false, "isClosed": false, "isOriginChanged": false, "isPageHidden": false, - "title": null, - "url": null, } } visualizationConfigurationFactory={Object {}} @@ -810,13 +804,10 @@ exports[`DetailsViewBody render render 1`] = ` } tabStoreData={ Object { - "id": null, "isChanged": false, "isClosed": false, "isOriginChanged": false, "isPageHidden": false, - "title": null, - "url": null, } } visualizationConfigurationFactory={Object {}} From 851051da876a711ddd333d9f56553582752fd6c3 Mon Sep 17 00:00:00 2001 From: madalynrose Date: Mon, 29 Aug 2022 10:35:11 -0700 Subject: [PATCH 3/7] propagate optional nature of rule result properties --- src/common/components/cards/rule-resources.tsx | 4 ++-- src/common/types/create-issue-details-text-data.ts | 6 +++--- src/common/types/store-data/card-view-model.ts | 6 +++--- src/common/types/store-data/unified-data-interface.ts | 6 +++--- .../types/store-data/visualization-scan-result-data.ts | 2 +- .../common/create-issue-details-builder-for-unified.ts | 10 +++++++++- .../common/create-issue-details-builder.ts | 10 +++++++++- .../common/issue-filing-url-string-utils.ts | 4 ++-- .../components/report-sections/minimal-rule-header.tsx | 2 +- 9 files changed, 33 insertions(+), 17 deletions(-) diff --git a/src/common/components/cards/rule-resources.tsx b/src/common/components/cards/rule-resources.tsx index b2004833f24..b17c5a3ed62 100644 --- a/src/common/components/cards/rule-resources.tsx +++ b/src/common/components/cards/rule-resources.tsx @@ -45,9 +45,9 @@ export const RuleResources = NamedFC('RuleResources', ({ dep }; const renderGuidanceLinks = () => ( - + ); - const renderGuidanceTags = () => ; + const renderGuidanceTags = () => ; return (
diff --git a/src/common/types/create-issue-details-text-data.ts b/src/common/types/create-issue-details-text-data.ts index aa3d3482ec5..bb51932afc9 100644 --- a/src/common/types/create-issue-details-text-data.ts +++ b/src/common/types/create-issue-details-text-data.ts @@ -5,9 +5,9 @@ import { GuidanceLink } from 'common/types/store-data/guidance-links'; export interface CreateIssueDetailsTextData { rule: { id: string; - description: string; - url: string; - guidance: GuidanceLink[]; + description?: string; + url?: string; + guidance?: GuidanceLink[]; }; targetApp: { name?: string; diff --git a/src/common/types/store-data/card-view-model.ts b/src/common/types/store-data/card-view-model.ts index 95903a663d6..b1ee73ea764 100644 --- a/src/common/types/store-data/card-view-model.ts +++ b/src/common/types/store-data/card-view-model.ts @@ -9,9 +9,9 @@ export type CardRuleResultStatus = InstanceResultStatus | 'inapplicable'; export interface CardRuleResult { id: string; nodes: CardResult[]; - description: string; - url: string; - guidance: GuidanceLink[]; + description?: string; + url?: string; + guidance?: GuidanceLink[]; isExpanded: boolean; } export type CardRuleResultsByStatus = { diff --git a/src/common/types/store-data/unified-data-interface.ts b/src/common/types/store-data/unified-data-interface.ts index 3a05836439f..ae240bb6d3a 100644 --- a/src/common/types/store-data/unified-data-interface.ts +++ b/src/common/types/store-data/unified-data-interface.ts @@ -62,9 +62,9 @@ export type ScanMetadata = { export interface UnifiedRule { id: string; - description: string; - url: string; - guidance: GuidanceLink[]; + description?: string; + url?: string; + guidance?: GuidanceLink[]; } export interface UnifiedScanResultStoreData { diff --git a/src/common/types/store-data/visualization-scan-result-data.ts b/src/common/types/store-data/visualization-scan-result-data.ts index 760a9817b35..3fd1fa92cb0 100644 --- a/src/common/types/store-data/visualization-scan-result-data.ts +++ b/src/common/types/store-data/visualization-scan-result-data.ts @@ -28,7 +28,7 @@ export type DecoratedAxeNodeResult = { html?: string; help?: string; id?: string; - guidanceLinks: GuidanceLink[]; + guidanceLinks?: GuidanceLink[]; helpUrl?: string; } & CheckData; diff --git a/src/issue-filing/common/create-issue-details-builder-for-unified.ts b/src/issue-filing/common/create-issue-details-builder-for-unified.ts index efb94ef0b93..7642a279154 100644 --- a/src/issue-filing/common/create-issue-details-builder-for-unified.ts +++ b/src/issue-filing/common/create-issue-details-builder-for-unified.ts @@ -33,10 +33,18 @@ export const createIssueDetailsBuilderForUnified = ( ] : []; + const ruleDetailsSection = () => { + const { description, url, id }= data.rule; + if(description && url && id ){ + return `${snippet(description)} (${link(url, id)})`; + } + return ''; + } + const lines = [ sectionHeader('Issue'), sectionHeaderSeparator(), - `${snippet(data.rule.description)} (${link(data.rule.url, data.rule.id)})`, + ruleDetailsSection(), sectionSeparator(), sectionHeader('Target application'), diff --git a/src/issue-filing/common/create-issue-details-builder.ts b/src/issue-filing/common/create-issue-details-builder.ts index d45046b80bb..1ca993b33ba 100644 --- a/src/issue-filing/common/create-issue-details-builder.ts +++ b/src/issue-filing/common/create-issue-details-builder.ts @@ -31,10 +31,18 @@ export const createIssueDetailsBuilder = (markup: MarkupFormatter): IssueDetails ] : []; + const ruleDetailsSection = () => { + const { description, url, id } = data.rule; + if (description && url && id) { + return `${snippet(description)} (${link(url, id)})`; + } + return ''; + }; + const lines = [ sectionHeader('Issue'), sectionHeaderSeparator(), - `${snippet(data.rule.description)} (${link(data.rule.url, data.rule.id)})`, + ruleDetailsSection(), sectionSeparator(), sectionHeader('Target application'), diff --git a/src/issue-filing/common/issue-filing-url-string-utils.ts b/src/issue-filing/common/issue-filing-url-string-utils.ts index 006bfde2346..82718f5de01 100644 --- a/src/issue-filing/common/issue-filing-url-string-utils.ts +++ b/src/issue-filing/common/issue-filing-url-string-utils.ts @@ -34,9 +34,9 @@ const getSelectorLastPart = (selector: string): string => { }; const standardizeTags = (data: CreateIssueDetailsTextData): string[] => { - const guidanceLinkTextTags = data.rule.guidance.map(link => link.text.toUpperCase()); + const guidanceLinkTextTags = data.rule.guidance ? data.rule.guidance.map(link => link.text.toUpperCase()) : []; const tagsFromGuidanceLinkTags: string[] = []; - data.rule.guidance.map(link => + data.rule.guidance?.map(link => link.tags ? link.tags.map(tag => tagsFromGuidanceLinkTags.push(tag.displayText)) : [], ); return guidanceLinkTextTags.concat(tagsFromGuidanceLinkTags); diff --git a/src/reports/components/report-sections/minimal-rule-header.tsx b/src/reports/components/report-sections/minimal-rule-header.tsx index 7165f862043..03f5d00927d 100644 --- a/src/reports/components/report-sections/minimal-rule-header.tsx +++ b/src/reports/components/report-sections/minimal-rule-header.tsx @@ -13,7 +13,7 @@ export const ruleDetailAutomationId = 'rule-detail'; export type MinimalRuleHeaderProps = { rule: { id: string; - description: string; + description?: string; nodes: any[]; }; outcomeType: InstanceOutcomeType; From bdeb975bbf27127916827c865023f72dd280ef60 Mon Sep 17 00:00:00 2001 From: madalynrose Date: Mon, 29 Aug 2022 12:33:35 -0700 Subject: [PATCH 4/7] update interactive-header to exclude optional param instead of setting it to null --- src/DetailsView/components/interactive-header.tsx | 3 +-- .../__snapshots__/interactive-header.test.tsx.snap | 5 ----- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/DetailsView/components/interactive-header.tsx b/src/DetailsView/components/interactive-header.tsx index 6e63f4035fb..da92a94915b 100644 --- a/src/DetailsView/components/interactive-header.tsx +++ b/src/DetailsView/components/interactive-header.tsx @@ -34,7 +34,7 @@ export const InteractiveHeader = NamedFC('InteractiveHea const isNavCollapsed = props.narrowModeStatus.isHeaderAndNavCollapsed; const getNavMenu = () => { if (isNavCollapsed === false) { - return null; + return; } return ( @@ -53,7 +53,6 @@ export const InteractiveHeader = NamedFC('InteractiveHea return (
} - items={null} narrowModeStatus={ Object { "isHeaderAndNavCollapsed": false, } } - navMenu={null} /> `; @@ -28,7 +26,6 @@ exports[`InteractiveHeader render: isNavCollapsed equals true 1`] = ` featureFlagData={null} /> } - items={null} narrowModeStatus={ Object { "isHeaderAndNavCollapsed": true, @@ -65,13 +62,11 @@ exports[`InteractiveHeader render: tabClosed equals false 1`] = ` } /> } - items={null} narrowModeStatus={ Object { "isHeaderAndNavCollapsed": false, } } - navMenu={null} /> `; From b1f7065d298cf51314d314eeac10416091f740ec Mon Sep 17 00:00:00 2001 From: madalynrose Date: Mon, 29 Aug 2022 13:19:58 -0700 Subject: [PATCH 5/7] make originalResult optional, default to undefined --- src/common/telemetry-data-factory.ts | 16 +++++++++------- src/common/types/axe-analyzer-result.ts | 2 +- src/injected/analyzers/base-analyzer.ts | 3 +-- .../common/issue-filing-url-string-utils.ts | 4 +++- .../injected/analyzers/base-analyzer.test.ts | 2 +- .../analyzers/tab-stops-analyzer.test.ts | 2 +- 6 files changed, 16 insertions(+), 13 deletions(-) diff --git a/src/common/telemetry-data-factory.ts b/src/common/telemetry-data-factory.ts index a80b0094009..c95014a882c 100644 --- a/src/common/telemetry-data-factory.ts +++ b/src/common/telemetry-data-factory.ts @@ -389,10 +389,10 @@ export class TelemetryDataFactory { testVisualizationType, ) => { const passedRuleResults: DictionaryStringTo = this.generateTelemetryRuleResult( - analyzerResult.originalResult.passes, + analyzerResult.originalResult?.passes, ); const failedRuleResults: DictionaryStringTo = this.generateTelemetryRuleResult( - analyzerResult.originalResult.violations, + analyzerResult.originalResult?.violations, ); const telemetry: IssuesAnalyzerScanTelemetryData = { ...this.forTestScan( @@ -415,13 +415,13 @@ export class TelemetryDataFactory { testVisualizationType, ) => { const passedRuleResults: DictionaryStringTo = this.generateTelemetryRuleResult( - analyzerResult.originalResult.passes, + analyzerResult.originalResult?.passes, ); const failedRuleResults: DictionaryStringTo = this.generateTelemetryRuleResult( - analyzerResult.originalResult.violations, + analyzerResult.originalResult?.violations, ); const incompleteRuleResults: DictionaryStringTo = this.generateTelemetryRuleResult( - analyzerResult.originalResult.incomplete, + analyzerResult.originalResult?.incomplete, ); const telemetry: NeedsReviewAnalyzerScanTelemetryData = { ...this.forTestScan( @@ -457,9 +457,11 @@ export class TelemetryDataFactory { return mouseEvent.detail === 0 ? 'keypress' : 'mouseclick'; } - private generateTelemetryRuleResult(axeRule: AxeRule[]): DictionaryStringTo { + private generateTelemetryRuleResult( + axeRule: AxeRule[] | undefined, + ): DictionaryStringTo { const ruleResults: DictionaryStringTo = {}; - axeRule.forEach(element => { + axeRule?.forEach(element => { const key: string = element.id; if (key != null) { ruleResults[key] = element.nodes.length; diff --git a/src/common/types/axe-analyzer-result.ts b/src/common/types/axe-analyzer-result.ts index 176a10e5165..5dd71f43e00 100644 --- a/src/common/types/axe-analyzer-result.ts +++ b/src/common/types/axe-analyzer-result.ts @@ -6,7 +6,7 @@ import { DictionaryStringTo } from 'types/common-types'; export interface AxeAnalyzerResult { results: DictionaryStringTo; - originalResult: ScanResults; + originalResult?: ScanResults; include?: SingleElementSelector[]; exclude?: SingleElementSelector[]; } diff --git a/src/injected/analyzers/base-analyzer.ts b/src/injected/analyzers/base-analyzer.ts index 4ca77d6a145..a16308be4f4 100644 --- a/src/injected/analyzers/base-analyzer.ts +++ b/src/injected/analyzers/base-analyzer.ts @@ -12,7 +12,6 @@ export class BaseAnalyzer implements Analyzer { protected visualizationType: VisualizationType; protected emptyResults: AxeAnalyzerResult = { results: {}, - originalResult: null, }; constructor( @@ -44,7 +43,7 @@ export class BaseAnalyzer implements Analyzer { config: AnalyzerConfiguration, ): Message { const messageType = config.analyzerMessageType; - const originalAxeResult = analyzerResult.originalResult; + const originalAxeResult = analyzerResult.originalResult!; const payload: ScanCompletedPayload = { key: config.key, selectorMap: analyzerResult.results, diff --git a/src/issue-filing/common/issue-filing-url-string-utils.ts b/src/issue-filing/common/issue-filing-url-string-utils.ts index 82718f5de01..02b457d08e1 100644 --- a/src/issue-filing/common/issue-filing-url-string-utils.ts +++ b/src/issue-filing/common/issue-filing-url-string-utils.ts @@ -34,7 +34,9 @@ const getSelectorLastPart = (selector: string): string => { }; const standardizeTags = (data: CreateIssueDetailsTextData): string[] => { - const guidanceLinkTextTags = data.rule.guidance ? data.rule.guidance.map(link => link.text.toUpperCase()) : []; + const guidanceLinkTextTags = data.rule.guidance + ? data.rule.guidance.map(link => link.text.toUpperCase()) + : []; const tagsFromGuidanceLinkTags: string[] = []; data.rule.guidance?.map(link => link.tags ? link.tags.map(tag => tagsFromGuidanceLinkTags.push(tag.displayText)) : [], diff --git a/src/tests/unit/tests/injected/analyzers/base-analyzer.test.ts b/src/tests/unit/tests/injected/analyzers/base-analyzer.test.ts index 52abb153e56..0a668da53c0 100644 --- a/src/tests/unit/tests/injected/analyzers/base-analyzer.test.ts +++ b/src/tests/unit/tests/injected/analyzers/base-analyzer.test.ts @@ -44,7 +44,7 @@ describe('BaseAnalyzer', () => { payload: { key: configStub.key, selectorMap: resultsStub, - scanResult: null, + scanResult: undefined, testType: typeStub, scanIncompleteWarnings, }, diff --git a/src/tests/unit/tests/injected/analyzers/tab-stops-analyzer.test.ts b/src/tests/unit/tests/injected/analyzers/tab-stops-analyzer.test.ts index 315fa60902f..75b37c63f25 100644 --- a/src/tests/unit/tests/injected/analyzers/tab-stops-analyzer.test.ts +++ b/src/tests/unit/tests/injected/analyzers/tab-stops-analyzer.test.ts @@ -86,9 +86,9 @@ describe('TabStopsAnalyzer', () => { payload: { key: configStub.key, selectorMap: {}, - scanResult: null, testType: visualizationTypeStub, scanIncompleteWarnings: [], + scanResult: undefined, }, }; }); From 0eace6cf48f451acefa1e984eee151bf4b8dc45f Mon Sep 17 00:00:00 2001 From: madalynrose Date: Thu, 1 Sep 2022 08:40:23 -0700 Subject: [PATCH 6/7] null:autoadd --- tsconfig.strictNullChecks.json | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tsconfig.strictNullChecks.json b/tsconfig.strictNullChecks.json index 79076010048..9d031956266 100644 --- a/tsconfig.strictNullChecks.json +++ b/tsconfig.strictNullChecks.json @@ -20,6 +20,7 @@ "./src/DetailsView/components/generic-toggle.tsx", "./src/DetailsView/components/iframe-warning.tsx", "./src/DetailsView/components/inline-start-over-button.tsx", + "./src/DetailsView/components/interactive-header.tsx", "./src/DetailsView/components/invalid-load-assessment-dialog.tsx", "./src/DetailsView/components/issues-table-handler.ts", "./src/DetailsView/components/left-nav/get-selected-details-view.ts", @@ -179,6 +180,7 @@ "./src/background/stores/path-snippet-store.ts", "./src/background/stores/side-panel.ts", "./src/background/stores/store-hub.ts", + "./src/background/stores/tab-store.ts", "./src/background/stores/unified-scan-result-store.ts", "./src/background/telemetry/app-insights-telemetry-client.ts", "./src/background/telemetry/application-telemetry-data-factory.ts", @@ -271,6 +273,7 @@ "./src/common/narrow-mode-thresholds.ts", "./src/common/navigator-utils.ts", "./src/common/platform.ts", + "./src/common/rule-based-view-model-provider.ts", "./src/common/state-dispatcher.ts", "./src/common/store-proxy.ts", "./src/common/store-update-message-hub.ts", @@ -387,13 +390,13 @@ "./src/electron/views/tab-stops/tab-stops-testing-content.tsx", "./src/electron/views/tab-stops/virtual-keyboard-buttons.tsx", "./src/electron/views/tab-stops/virtual-keyboard-view.tsx", - "./src/injected/adapters/resolution-creator.ts", - "./src/injected/adapters/scan-results-to-unified-results.ts", "./src/injected/all-frame-runner.ts", "./src/injected/analyzers/analyzer.ts", + "./src/injected/analyzers/base-analyzer.ts", "./src/injected/analyzers/filter-results.ts", "./src/injected/analyzers/focus-traps-handler.ts", "./src/injected/analyzers/notification-text-creator.ts", + "./src/injected/analyzers/rule-analyzer.ts", "./src/injected/analyzers/tab-stops-done-analyzing-tracker.ts", "./src/injected/analyzers/tab-stops-handler.ts", "./src/injected/analyzers/tab-stops-orchestrator.ts", @@ -625,6 +628,7 @@ "src/electron/window-management/**/*", "src/fast-pass/**/*", "src/icons/**/*", + "src/injected/adapters/**/*", "src/injected/frameCommunicators/**/*", "src/issue-filing/common/markup/**/*", "src/popup/actions/**/*", From 93d51c6f161ac74f4d977e7f99397a328d57775c Mon Sep 17 00:00:00 2001 From: madalynrose Date: Thu, 1 Sep 2022 08:44:59 -0700 Subject: [PATCH 7/7] format:fix --- src/common/rule-based-view-model-provider.ts | 4 ++-- .../common/create-issue-details-builder-for-unified.ts | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/common/rule-based-view-model-provider.ts b/src/common/rule-based-view-model-provider.ts index 2fc0eeb2b8a..bab79b4d137 100644 --- a/src/common/rule-based-view-model-provider.ts +++ b/src/common/rule-based-view-model-provider.ts @@ -18,13 +18,13 @@ export type GetCardViewData = ( rules: UnifiedRule[], results: UnifiedResult[], cardSelectionViewData: CardSelectionViewData, -) => (CardsViewModel | null); +) => CardsViewModel | null; export const getCardViewData: GetCardViewData = ( rules: UnifiedRule[], results: UnifiedResult[], cardSelectionViewData: CardSelectionViewData, -): (CardsViewModel | null) => { +): CardsViewModel | null => { if (results == null || rules == null || cardSelectionViewData == null) { return null; } diff --git a/src/issue-filing/common/create-issue-details-builder-for-unified.ts b/src/issue-filing/common/create-issue-details-builder-for-unified.ts index 7642a279154..f3516097382 100644 --- a/src/issue-filing/common/create-issue-details-builder-for-unified.ts +++ b/src/issue-filing/common/create-issue-details-builder-for-unified.ts @@ -34,12 +34,12 @@ export const createIssueDetailsBuilderForUnified = ( : []; const ruleDetailsSection = () => { - const { description, url, id }= data.rule; - if(description && url && id ){ + const { description, url, id } = data.rule; + if (description && url && id) { return `${snippet(description)} (${link(url, id)})`; } return ''; - } + }; const lines = [ sectionHeader('Issue'),