Fix rest eslint errors manually

This commit is contained in:
Kenichi Kamiya
2022-07-04 20:09:44 +09:00
parent 6e9189a5c1
commit 9fdc2574b8
2 changed files with 5 additions and 13 deletions

View File

@@ -1,4 +1,4 @@
import {Change, ChangeSchema} from './schemas'
import {Change} from './schemas'
/**
* Loops through a list of changes, filtering and returning the

View File

@@ -58,7 +58,7 @@ async function run(): Promise<void> {
)
if (licenseErrors.length > 0) {
printLicensesError(licenseErrors, licenses)
printLicensesError(licenseErrors)
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) {
core.info(
`${styles.bold.open}${change.manifest} » ${change.name}@${
@@ -117,19 +117,11 @@ function renderSeverity(
return `${styles.color[color].open}(${severity} severity)${styles.color[color].close}`
}
function printLicensesError(
changes: Change[],
licenses: {
allow?: string[]
deny?: string[]
}
): void {
if (changes.length == 0) {
function printLicensesError(changes: Change[]): void {
if (changes.length === 0) {
return
}
const {allow = [], deny = []} = licenses
core.info('\nThe following dependencies have incompatible licenses:\n')
for (const change of changes) {
core.info(