Skip to content
This repository has been archived by the owner on May 8, 2018. It is now read-only.

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
nlf committed Oct 3, 2017
1 parent e28c457 commit ad94628
Show file tree
Hide file tree
Showing 11 changed files with 1,218 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .eslintrc
@@ -1,3 +1,3 @@
{
"extends": "nodesecurity/es5"
"extends": "nodesecurity"
}
4 changes: 2 additions & 2 deletions commands/check.js
Expand Up @@ -50,13 +50,13 @@ exports.builder = {
group: 'Project:'
},
integration: {
description: `your project's uuid`,
description: 'your project\'s uuid',
implies: 'org',
group: 'Project:'
}
};

exports.handler = Command.wrap('check', function (args) {
exports.handler = Command.wrap('check', (args) => {

let pkg;
try {
Expand Down
4 changes: 2 additions & 2 deletions commands/gather.js
Expand Up @@ -29,9 +29,9 @@ exports.builder = {
}
};

exports.handler = Command.wrap('gather', function (args) {
exports.handler = Command.wrap('gather', (args) => {

let path = args.path.endsWith('advisories.json') ? args.path : Path.join(args.path, 'advisories.json');
const path = args.path.endsWith('advisories.json') ? args.path : Path.join(args.path, 'advisories.json');

return internals.fetch(args.baseUrl).then((items) => {

Expand Down
2 changes: 1 addition & 1 deletion commands/login.js
Expand Up @@ -20,7 +20,7 @@ exports.builder = {
}
};

exports.handler = Command.wrap('login', function (args) {
exports.handler = Command.wrap('login', (args) => {

let input = Promise.resolve();
if (process.stdout.isTTY) {
Expand Down
4 changes: 2 additions & 2 deletions lib/command.js
Expand Up @@ -65,14 +65,14 @@ exports.wrap = function (name, handler) {
if (args.filter ||
args.threshold) {

maxCvss = Math.max(...result.data.map(item => item.cvss_score));
maxCvss = Math.max(...result.data.map((item) => item.cvss_score));
}

if (name === 'check' &&
args.filter &&
result.data.length) {

result.data = result.data.filter(item => item.cvss_score > args.filter);
result.data = result.data.filter((item) => item.cvss_score > args.filter);
}

let output;
Expand Down
2 changes: 1 addition & 1 deletion lib/offline.js
Expand Up @@ -51,7 +51,7 @@ exports.check = function (options) {
}).forEach((finding) => {

for (const vuln of finding.vulnerabilities) {
const paths = tree[finding.module + '@' + finding.version].paths;
const paths = tree[`${finding.module}@${finding.version}`].paths;

for (const path of paths) {
result.push({
Expand Down

0 comments on commit ad94628

Please sign in to comment.