Skip to content

Commit

Permalink
linting run through
Browse files Browse the repository at this point in the history
  • Loading branch information
philipobrien committed Nov 27, 2014
1 parent 790b695 commit f8b9182
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 15 deletions.
7 changes: 4 additions & 3 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@ module.exports = function(grunt) {
pkg: grunt.file.readJSON('package.json'),
jshint: {
all: [lib],
options: grunt.file.readJSON('.jshintrc')
options: {
reporter: require('jshint-stylish'),
jshintrc: '.jshintrc'
}
}
});

// These plugins provide necessary tasks.
grunt.loadNpmTasks('grunt-contrib-jshint');

// Default task(s).
grunt.registerTask('default', ['jshint' ]);

};
10 changes: 5 additions & 5 deletions lib/CBasehelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ var postAction = function (msg, callback) {
var options = (undefined === msg.format) ? {} : {format: msg.format };
var db_use = getDb(msg['bucket']);

db_use.add(msg.database, msg.object_data, options, function (err, result) {
db_use.add(msg.database, msg.object_data, options, function (err) {
if (err) {
loglet.error(err);
var httpCode = (12 === err.code) ? HTTPStatus.CONFLICT : HTTPStatus.INTERNAL_SERVER_ERROR;
Expand Down Expand Up @@ -137,7 +137,7 @@ var putAction = function (msg, callback) {

var options = (undefined === msg.format) ? {} : {format: msg.format };

db_use.set(msg.database, msg.object_data, options, function (err, result) {
db_use.set(msg.database, msg.object_data, options, function (err) {

if (err) {
logger.log('error', err);
Expand Down Expand Up @@ -550,7 +550,7 @@ var fetchAction = function (msg, callback) {

var createDBAction = function (msg, callback) {

getDb('openi').add(msg.database, {}, function (err, res) {
getDb('openi').add(msg.database, {}, function (err) {

if (err && err.code !== 12) {
//logger.log('error', err)
Expand Down Expand Up @@ -582,7 +582,7 @@ var deleteDBAction = function (msg, callback) {
};


var patchAttachmentAction = function (msg, callback) {
var patchAttachmentAction = function (msg) {

var db_use = getDb('openi');

Expand Down Expand Up @@ -617,7 +617,7 @@ var patchAttachmentAction = function (msg, callback) {
};


var patchAttachmentObjectAction = function (msg, callback) {
var patchAttachmentObjectAction = function (msg) {

var db_use = getDb('openi');

Expand Down
6 changes: 3 additions & 3 deletions lib/couchbaseViews.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,14 @@ var design_docs = {

function createViewsForDesignDoc(db, localdocName, localdocValue) {

db.getDesignDoc( localdocName, function( err, ddoc, meta ) {
db.getDesignDoc( localdocName, function( err, ddoc) {

if(err) {
loglet.error(err);
}

if ( null !== err && 4104 === err.code) {
db.setDesignDoc( localdocName, localdocValue, function(err, res) {
db.setDesignDoc( localdocName, localdocValue, function(err) {
console.log(err);
if(err) {
loglet.error(err);
Expand All @@ -102,7 +102,7 @@ function createViewsForDesignDoc(db, localdocName, localdocValue) {
if(localdocValue.views.hasOwnProperty(i)) {
if (!(i in ddoc['views'])) {
ddoc.views[i] = localdocValue.views[i];
db.setDesignDoc( localdocName, ddoc, function( err, res) {
db.setDesignDoc( localdocName, ddoc, function( err) {
if(err) {
loglet.error(err);
}
Expand Down
1 change: 0 additions & 1 deletion lib/evolution.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict';

var Lazy = require('lazy.js');
var url = require('url');
var config = require('./config.js');

function invertType(typ) {
Expand Down
1 change: 0 additions & 1 deletion lib/jsonnorm.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
'use strict';
var minify = require('jsonminify');
var crypto = require('crypto');

function _sort(json, depth, til) {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
},
"devDependencies": {
"grunt": "^0.4.5",
"grunt-config": "",
"grunt-contrib-jshint": "^0.10.0"
"grunt-contrib-jshint": "^0.10.0",
"jshint-stylish": "^1.0.0"
},
"keywords": []
}

0 comments on commit f8b9182

Please sign in to comment.