Fix rest eslint errors manually
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
import {Change, ChangeSchema} from './schemas'
|
import {Change} from './schemas'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Loops through a list of changes, filtering and returning the
|
* Loops through a list of changes, filtering and returning the
|
||||||
|
|||||||
+4
-12
@@ -58,7 +58,7 @@ async function run(): Promise<void> {
|
|||||||
)
|
)
|
||||||
|
|
||||||
if (licenseErrors.length > 0) {
|
if (licenseErrors.length > 0) {
|
||||||
printLicensesError(licenseErrors, licenses)
|
printLicensesError(licenseErrors)
|
||||||
core.setFailed('Dependency review detected incompatible licenses.')
|
core.setFailed('Dependency review detected incompatible licenses.')
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -90,7 +90,7 @@ async function run(): Promise<void> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function printChangeVulnerabilities(change: Change) {
|
function printChangeVulnerabilities(change: Change): void {
|
||||||
for (const vuln of change.vulnerabilities) {
|
for (const vuln of change.vulnerabilities) {
|
||||||
core.info(
|
core.info(
|
||||||
`${styles.bold.open}${change.manifest} » ${change.name}@${
|
`${styles.bold.open}${change.manifest} » ${change.name}@${
|
||||||
@@ -117,19 +117,11 @@ function renderSeverity(
|
|||||||
return `${styles.color[color].open}(${severity} severity)${styles.color[color].close}`
|
return `${styles.color[color].open}(${severity} severity)${styles.color[color].close}`
|
||||||
}
|
}
|
||||||
|
|
||||||
function printLicensesError(
|
function printLicensesError(changes: Change[]): void {
|
||||||
changes: Change[],
|
if (changes.length === 0) {
|
||||||
licenses: {
|
|
||||||
allow?: string[]
|
|
||||||
deny?: string[]
|
|
||||||
}
|
|
||||||
): void {
|
|
||||||
if (changes.length == 0) {
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
const {allow = [], deny = []} = licenses
|
|
||||||
|
|
||||||
core.info('\nThe following dependencies have incompatible licenses:\n')
|
core.info('\nThe following dependencies have incompatible licenses:\n')
|
||||||
for (const change of changes) {
|
for (const change of changes) {
|
||||||
core.info(
|
core.info(
|
||||||
|
|||||||
Reference in New Issue
Block a user