Skip to content

Commit

Permalink
Adopt the latest linter
Browse files Browse the repository at this point in the history
  • Loading branch information
eaviles committed Jun 19, 2019
1 parent a28878d commit fb80427
Show file tree
Hide file tree
Showing 2 changed files with 275 additions and 938 deletions.
8 changes: 4 additions & 4 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ function pushPkgs({ dir, logger, deps = {}, type, pkgs }) {
: chalk.red('not installed');
logger.info(`${chalk.red(name)} is ${warning}`);
}
pkgs.push({ name, wanted, installed, type, latest, shouldBeInstalled });
pkgs.push({ installed, latest, name, shouldBeInstalled, type, wanted });
});
}

function getPkgIds(filteredPkgs) {
return filteredPkgs.map(({ name, latest }) => `${name}@${latest}`).join(' ');
return filteredPkgs.map(({ latest, name }) => `${name}@${latest}`).join(' ');
}

/**
Expand All @@ -75,8 +75,8 @@ async function verifyDeps({ dir, logger = console } = {}) {
logger.info(chalk.blue('Checking NPM module versions…\n'));
const pkgs = [];
await Promise.all([
...pushPkgs({ dir, logger, deps: dependencies, type: 'prod', pkgs }),
...pushPkgs({ dir, logger, deps: devDependencies, type: 'dev', pkgs })
...pushPkgs({ deps: dependencies, dir, logger, pkgs, type: 'prod' }),
...pushPkgs({ deps: devDependencies, dir, logger, pkgs, type: 'dev' })
]);
const toInstall = pkgs.filter(({ shouldBeInstalled }) => shouldBeInstalled);
if (toInstall.length > 0) {
Expand Down
Loading

0 comments on commit fb80427

Please sign in to comment.