Skip to content

Commit

Permalink
Merge pull request #759 from setchy/feature/lint-on-master
Browse files Browse the repository at this point in the history
feat: lint on master
  • Loading branch information
nscuro authored Mar 1, 2024
2 parents 71dd9bd + 8a6e367 commit 22ebfe9
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: Lint
on:
push:
branches:
- 'master' # Default branch
pull_request:
branches:
- 'master' # Default branch

permissions:
contents: read
Expand Down
10 changes: 8 additions & 2 deletions src/shared/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ $common.formatProjectTagLabel = function formatProjectTagLabel(router, tag) {
if (!tag) {
return '';
}
return `<a href="${router.resolve({ name: 'Projects', query: { tag: tag.name } }).href}" class="badge badge-tag text-lowercase mr-1">${xssFilters.inHTMLData(tag.name)}</a>`;
return `<a href="${
router.resolve({ name: 'Projects', query: { tag: tag.name } }).href
}" class="badge badge-tag text-lowercase mr-1">${xssFilters.inHTMLData(
tag.name,
)}</a>`;
};

/**
Expand Down Expand Up @@ -408,7 +412,9 @@ $common.componentClassifierLabelProjectUrlFormatter = (i18n) => {
case 'DEVICE':
case 'FIRMWARE':
case 'FILE':
return `<a href="${url}">${i18n.$t(`message.component_${value.toLowerCase()}`)}</a>`;
return `<a href="${url}">${i18n.$t(
`message.component_${value.toLowerCase()}`,
)}</a>`;
default:
return null;
}
Expand Down
4 changes: 3 additions & 1 deletion src/views/portfolio/projects/ComponentDetailsModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,9 @@ export default {
let url = xssFilters.uriInUnQuotedAttr(
common.valueWithDefault(value, ''),
);
return `<a href="${url}">${xssFilters.inHTMLData(common.valueWithDefault(value, ''))}</a>`;
return `<a href="${url}">${xssFilters.inHTMLData(
common.valueWithDefault(value, ''),
)}</a>`;
},
},
{
Expand Down
4 changes: 3 additions & 1 deletion src/views/portfolio/projects/ComponentVulnerabilities.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ export default {
);
label +=
common.formatSourceLabel(alias.source) +
` <a href="${url}">${xssFilters.inHTMLData(alias.vulnId)}</a>`;
` <a href="${url}">${xssFilters.inHTMLData(
alias.vulnId,
)}</a>`;
if (i < aliases.length - 1) label += '<br/><br/>';
}
return label;
Expand Down
6 changes: 5 additions & 1 deletion src/views/portfolio/projects/ProjectDependencyGraph.vue
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,11 @@ export default {
this.$route.params.componentUuids,
);
this.loading = true;
let url = `${this.$api.BASE_URL}/${this.$api.URL_COMPONENT}/project/${this.project.uuid}/dependencyGraph/${encodeURIComponent(this.$route.params.componentUuids)}`;
let url = `${this.$api.BASE_URL}/${this.$api.URL_COMPONENT}/project/${
this.project.uuid
}/dependencyGraph/${encodeURIComponent(
this.$route.params.componentUuids,
)}`;
this.axios.get(url).then((response) => {
if (response.data && Object.keys(response.data).length > 0) {
this.notFound = false;
Expand Down
4 changes: 3 additions & 1 deletion src/views/portfolio/projects/ProjectDetailsModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,9 @@ export default {
let url = xssFilters.uriInUnQuotedAttr(
common.valueWithDefault(value, ''),
);
return `<a href="${url}">${xssFilters.inHTMLData(common.valueWithDefault(value, ''))}</a>`;
return `<a href="${url}">${xssFilters.inHTMLData(
common.valueWithDefault(value, ''),
)}</a>`;
},
},
{
Expand Down
4 changes: 3 additions & 1 deletion src/views/portfolio/projects/ProjectFindings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,9 @@ export default {
);
label +=
common.formatSourceLabel(alias.source) +
` <a href="${url}">${xssFilters.inHTMLData(alias.vulnId)}</a>`;
` <a href="${url}">${xssFilters.inHTMLData(
alias.vulnId,
)}</a>`;
if (i < aliases.length - 1) label += '<br/><br/>';
}
return label;
Expand Down
4 changes: 3 additions & 1 deletion src/views/portfolio/projects/ServiceDetailsModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,9 @@ export default {
let url = xssFilters.uriInUnQuotedAttr(
common.valueWithDefault(value, ''),
);
return `<a href="${url}">${xssFilters.inHTMLData(common.valueWithDefault(value, ''))}</a>`;
return `<a href="${url}">${xssFilters.inHTMLData(
common.valueWithDefault(value, ''),
)}</a>`;
},
},
{
Expand Down
4 changes: 3 additions & 1 deletion src/views/portfolio/vulnerabilities/VulnerabilityList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@ export default {
);
label +=
common.formatSourceLabel(alias.source) +
` <a href="${url}">${xssFilters.inHTMLData(alias.vulnId)}</a>`;
` <a href="${url}">${xssFilters.inHTMLData(
alias.vulnId,
)}</a>`;
if (i < aliases.length - 1) label += '<br/><br/>';
}
return label;
Expand Down

0 comments on commit 22ebfe9

Please sign in to comment.