Skip to content

Commit

Permalink
Add eslint and make it happy.
Browse files Browse the repository at this point in the history
  • Loading branch information
sorccu committed Nov 4, 2016
1 parent 0901a71 commit 065b50d
Show file tree
Hide file tree
Showing 4 changed files with 821 additions and 5 deletions.
6 changes: 6 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
root: true,
extends: [
'standard'
]
}
5 changes: 1 addition & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Commands:
}

// The main CLI.
const main = module.exports = (config) => {
module.exports = (config) => {
return expandConfig(config).then(config => {
const args = process.argv.slice(2)

Expand Down Expand Up @@ -197,8 +197,6 @@ const download = module.exports.download = (src, writer) => {
}
}

const contentType = res.headers['content-type']

return resolve(new Promise((resolve, reject) => {
const decode = (stream) => {
const contentEncoding = res.headers['content-encoding']
Expand Down Expand Up @@ -393,7 +391,6 @@ const expandConfig = module.exports.expandConfig = (options) => {

const context = options.context || path.resolve(__dirname, '../..')
const pkg = require(path.resolve(context, 'package'))
const repoUrl = repositoryUrlFromPackage(pkg)

const bindings = options.bindings.map(binding => {
const name = binding.name
Expand Down
8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,11 @@
"type": "git",
"url": "https://github.com/sorccu/node-prebuilt-bindings.git"
},
"main": "./index"
"main": "./index",
"devDependencies": {
"eslint": "^3.9.1",
"eslint-config-standard": "^6.2.1",
"eslint-plugin-promise": "^3.3.0",
"eslint-plugin-standard": "^2.0.1"
}
}
Loading

0 comments on commit 065b50d

Please sign in to comment.