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-names
eslint rule? I know we don't have an issue because we're setting the component name with[getComponentNameForType(...)]
here and withVulnerabilityDetail...
inreport_item_graphql.vue
but 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
_item
at the end of each component and reworkgetComponentNameForType
to be:export const getComponentNameForType = (reportType) => `${capitalizeFirstCharacter(reportType)}Item`;
Possible implementation plan
- rename all components within
ee/app/assets/javascripts/vulnerabilities/components/generic_report/types
to 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)}Item
ingetComponentNameForType
- Update component names in
ee/app/assets/javascripts/vulnerabilities/components/generic_report/types/component_map.js
andee/app/assets/javascripts/vulnerabilities/components/generic_report/report_item_graphql.vue
Edited by Lorenz van Herwaarden