Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: lint on master #759

Merged
merged 1 commit into from
Mar 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading