Follow-up from "Resolve "Shortest path not displayed in vulnerability page""
The following discussion from !142220 (merged) should be addressed:
-
@lorenzvanherwaarden started a discussion: (+1 comment) suggestion (non-blocking): WDYT about renaming all these detail components so they are in accordance with the
vue/multi-word-component-nameseslint rule? I know we don't have an issue because we're setting the component name with[getComponentNameForType(...)]here and withVulnerabilityDetail...inreport_item_graphql.vuebut if we rename all the components, we can get rid of the eslint disable rule comment<!-- eslint-disable vue/multi-word-component-names -->for all those components.We can also do this in a follow-up.
We could add
_itemat the end of each component and reworkgetComponentNameForTypeto be:export const getComponentNameForType = (reportType) => `${capitalizeFirstCharacter(reportType)}Item`;
Possible implementation plan
- rename all components within
ee/app/assets/javascripts/vulnerabilities/components/generic_report/typesto be suffixed with_item-> e.g.url.vue->url_item.vue - Remove
<!-- eslint-disable vue/multi-word-component-names -->eslint disable rule from all those components - replace
ReportType${capitalizeFirstCharacter(reportType)}with${capitalizeFirstCharacter(reportType)}ItemingetComponentNameForType - Update component names in
ee/app/assets/javascripts/vulnerabilities/components/generic_report/types/component_map.jsandee/app/assets/javascripts/vulnerabilities/components/generic_report/report_item_graphql.vue
Edited by Lorenz van Herwaarden