Comparing version 2.0.0-alpha.2 to 2.0.0
#!/usr/bin/env node | ||
// Based on https://gist.github.com/oculus42/99092766633ca2451e9d6e2217a94a80 | ||
const methods = require('../index'); | ||
const methods = require('../src/methods'); | ||
@@ -6,0 +6,0 @@ const defaultArgs = ['airbnb']; |
46
index.js
@@ -1,47 +0,3 @@ | ||
#! /usr/bin/env node | ||
// Based on https://gist.github.com/oculus42/99092766633ca2451e9d6e2217a94a80 | ||
const cmd = require('node-cmd'); | ||
const defaultArgs = ['airbnb']; | ||
const installPackages = (packageList = []) => { | ||
return new Promise((resolve, reject) => { | ||
cmd.get(`npm install ${packageList.join(' ')}`, (err, data, stderr) => { | ||
if (err) { | ||
reject(err); | ||
return; | ||
} | ||
resolve({ | ||
data, | ||
stderr, | ||
}); | ||
}); | ||
}); | ||
}; | ||
const methods = { | ||
airbnb: function () { | ||
const packages = [ | ||
'eslint', | ||
'eslint-plugin-import', | ||
'eslint-plugin-react', | ||
'eslint-plugin-jsx-a11y', | ||
'eslint-config-airbnb', | ||
]; | ||
return installPackages(packages); | ||
}, | ||
'airbnb-base': function () { | ||
const packages = [ | ||
'eslint', | ||
'eslint-plugin-import', | ||
'eslint-config-airbnb-base', | ||
]; | ||
return installPackages(packages); | ||
}, | ||
}; | ||
module.exports = methods; | ||
module.exports = require('./src/methods'); |
@@ -12,3 +12,4 @@ { | ||
"dependencies": { | ||
"node-cmd": "^3.0.0" | ||
"node-cmd": "^3.0.0", | ||
"pkg-dir": "^2.0.0" | ||
}, | ||
@@ -30,3 +31,3 @@ "description": "Linter", | ||
}, | ||
"version": "2.0.0-alpha.2" | ||
"version": "2.0.0" | ||
} |
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
5895
7
114
1
2
1
+ Addedpkg-dir@^2.0.0
+ Addedfind-up@2.1.0(transitive)
+ Addedlocate-path@2.0.0(transitive)
+ Addedp-limit@1.3.0(transitive)
+ Addedp-locate@2.0.0(transitive)
+ Addedp-try@1.0.0(transitive)
+ Addedpath-exists@3.0.0(transitive)
+ Addedpkg-dir@2.0.0(transitive)