Skip to content

Commit

Permalink
Fix eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
sparshithNR committed Jun 9, 2021
1 parent 585e709 commit 23b4558
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 6 deletions.
10 changes: 8 additions & 2 deletions lib/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,13 @@ async function main(cli, { policyDetails, setupProjectFn }) {
let result;
let processed = false;
try {
result = await processPolicies(projectPaths, setupProjectFn, spinner, currentDate, ignoredDependencies);
result = await processPolicies(
projectPaths,
setupProjectFn,
spinner,
currentDate,
ignoredDependencies,
);
if (result.isInSupportWindow === false) {
process.exitCode = 1;
}
Expand Down Expand Up @@ -92,7 +98,7 @@ async function run(
type: 'string',
alias: 'i',
isMultiple: true,
}
},
},
}),
{ policyDetails, setupProjectFn },
Expand Down
8 changes: 6 additions & 2 deletions lib/project/multiple-projects.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,13 @@ async function processPolicies(projectPaths, setupProjectFn, spinner, today, ign
work.push(
queue.add(async () => {
let { dependenciesToCheck, pkg } = await setupProject(projectPath);
let dependenciesToCheckAfterIgnore = dependenciesToCheck.filter(dep => !ignoredDependencies.includes(dep.name));
let dependenciesToCheckAfterIgnore = dependenciesToCheck.filter(
dep => !ignoredDependencies.includes(dep.name),
);
progressLogger.updateTotalDepCount(dependenciesToCheck.length);
progressLogger.updateIgnoredDepCount(dependenciesToCheck.length - dependenciesToCheckAfterIgnore.length);
progressLogger.updateIgnoredDepCount(
dependenciesToCheck.length - dependenciesToCheckAfterIgnore.length,
);
let auditResult = await isInSupportWindow(
dependenciesToCheckAfterIgnore,
pkg.name,
Expand Down
4 changes: 3 additions & 1 deletion lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,9 @@ module.exports.ProgressLogger = class ProgressLogger {
}
this.spinner.text = `Total Dependencies: ${this.totalPackages}, Verified: ${
this.processedCount
}, Remaining: ${this.totalPackages - this.processedCount - this.ignoredPackages}, Ignored: ${this.ignoredPackages}`;
}, Remaining: ${this.totalPackages - this.processedCount - this.ignoredPackages}, Ignored: ${
this.ignoredPackages
}`;
if (this.totalPackages > this.processedCount) {
this.processedCount++;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/cli-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ describe('CLI', function () {
});
});

describe(`--ignore-dependencies`, function() {
describe(`--ignore-dependencies`, function () {
it('check console log', async function () {
const child = await runSupportedCmd([
`${__dirname}/fixtures/supported-project`,
Expand Down

0 comments on commit 23b4558

Please sign in to comment.