Commit 40d8e567 by Ben Drucker

Linting

parent c2c6ebcb
{
"node": true,
"browser": true,
"esnext": true,
"bitwise": true,
"eqeqeq": true,
"immed": true,
"indent": 2,
"latedef": true,
"newcap": true,
"noarg": true,
"quotmark": "single",
"regexp": true,
"undef": true,
"unused": true,
"strict": true,
"trailing": true,
"smarttabs": true,
"predef": ["-Promise"]
}
...@@ -4,6 +4,13 @@ var gulp = require('gulp'); ...@@ -4,6 +4,13 @@ var gulp = require('gulp');
var plugins = require('gulp-load-plugins')(); var plugins = require('gulp-load-plugins')();
var argv = require('yargs').argv; var argv = require('yargs').argv;
gulp.task('lint', function () {
return gulp.src(['./src/**/*.js', './test/**/*.js', 'gulpfile.js'])
.pipe(plugins.jshint())
.pipe(plugins.jshint.reporter('jshint-stylish'))
.pipe(plugins.jshint.reporter('fail'));
});
gulp.task('cover', function () { gulp.task('cover', function () {
return gulp.src('./src/**/*.js') return gulp.src('./src/**/*.js')
.pipe(plugins.istanbul()); .pipe(plugins.istanbul());
......
...@@ -39,7 +39,7 @@ ClearbitClient.prototype.url = function (options) { ...@@ -39,7 +39,7 @@ ClearbitClient.prototype.url = function (options) {
return this.base(options) + options.path; return this.base(options) + options.path;
}; };
function generateQuery (objects) { function generateQuery () {
var query = _.omit(_.extend.apply(_, [{}].concat([].slice.apply(arguments))), _.isUndefined); var query = _.omit(_.extend.apply(_, [{}].concat([].slice.apply(arguments))), _.isUndefined);
return _.isEmpty(query) ? undefined : query; return _.isEmpty(query) ? undefined : query;
} }
......
{
"node": true,
"browser": true,
"esnext": true,
"bitwise": true,
"eqeqeq": true,
"immed": true,
"indent": 2,
"latedef": true,
"newcap": true,
"noarg": true,
"quotmark": "single",
"regexp": true,
"undef": true,
"unused": true,
"strict": true,
"trailing": true,
"smarttabs": true,
"expr": true,
"predef": ["-Promise"],
"globals": {
"describe": false,
"it": false,
"before": false,
"beforeEach": false,
"after": false,
"afterEach": false
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment