Skip to content

Commit

Permalink
eslint config 2.0 + remove extra empty lines
Browse files Browse the repository at this point in the history
Upgrade eslint-config-loopback to ^2.0.0.

Remove extra empty lines to make `npm run lint` pass again.
  • Loading branch information
bajtos committed Apr 19, 2016
1 parent cd8be0e commit c7f34c3
Show file tree
Hide file tree
Showing 22 changed files with 1 addition and 50 deletions.
2 changes: 0 additions & 2 deletions examples/app-noschema.js
Expand Up @@ -82,5 +82,3 @@ User.create(user, function(err, u1) {
console.log('Found: ', u2.toObject());
});
});


4 changes: 0 additions & 4 deletions examples/app.js
Expand Up @@ -41,7 +41,3 @@ console.log(modelBuilder.definitions);
User.mixin(Group);
var user = new User({ name: 'Ray', group: 'Admin' });
console.log(user);




1 change: 0 additions & 1 deletion lib/connectors/memory.js
Expand Up @@ -482,7 +482,6 @@ function applyFilter(filter) {
});
}


if (test(where[key], value)) {
return true;
}
Expand Down
1 change: 0 additions & 1 deletion lib/dao.js
Expand Up @@ -2998,7 +2998,6 @@ DataAccessObject.prototype.reload = function reload(cb) {
return this.constructor.findById(getIdValue(this.constructor, this), cb);
};


/*
* Define readonly property on object
*
Expand Down
2 changes: 0 additions & 2 deletions lib/include.js
Expand Up @@ -785,7 +785,6 @@ Inclusion.include = function(objects, include, options, cb) {
}
}


/**
* Handle Inclusion of Polymorphic HasOne relation
* @param callback
Expand Down Expand Up @@ -921,7 +920,6 @@ Inclusion.include = function(objects, include, options, cb) {
}
}


/**
* Handle Inclusion of EmbedsMany/EmbedsManyWithBelongsTo/EmbedsOne
* Relations. Since Embedded docs are part of parents, no need to make
Expand Down
2 changes: 0 additions & 2 deletions lib/include_utils.js
Expand Up @@ -38,7 +38,6 @@ function buildOneToManyIdentityMapWithOrigKeys(objs, idName) {
return kvMap;
}


/**
* Yeah, it joins. You need three things id -> obj1 map, id -> [obj2] map and merge function.
* This functions will take each obj1, locate all data to join in map2 and call merge function.
Expand All @@ -56,7 +55,6 @@ function join(oneToOneIdMap, oneToManyIdMap, mergeF) {
}
}


/**
* Map with arbitrary keys and values. User .set() and .get() to work with values instead of []
* @returns {{set: Function, get: Function, remove: Function, exist: Function, getKeys: Function}}
Expand Down
2 changes: 0 additions & 2 deletions lib/introspection.js
Expand Up @@ -61,5 +61,3 @@ module.exports = function getIntrospector(ModelBuilder) {
ModelBuilder.introspect = introspectType;
return introspectType;
};


7 changes: 0 additions & 7 deletions lib/relation-definition.js
Expand Up @@ -818,7 +818,6 @@ HasMany.prototype.exists = function(fkId, options, cb) {
var modelInstance = this.modelInstance;
cb = cb || utils.createPromiseCallback();


this.findById(fkId, function(err, inst) {
if (err) {
return cb(err);
Expand Down Expand Up @@ -1054,8 +1053,6 @@ HasManyThrough.prototype.create = function create(data, options, cb) {
return cb.promise;
};



/**
* Add the target model instance to the 'hasMany' relation
* @param {Object|ID} acInst The actual instance or id value
Expand Down Expand Up @@ -1191,7 +1188,6 @@ HasManyThrough.prototype.remove = function(acInst, options, cb) {
return cb.promise;
};


/**
* Declare "belongsTo" relation that sets up a one-to-one connection with
* another model, such that each instance of the declaring model "belongs to"
Expand Down Expand Up @@ -1513,7 +1509,6 @@ BelongsTo.prototype.related = function(condOrRefresh, options, cb) {
}
};


/**
* Define a Promise-based method for the belongsTo relation itself
* - order.customer.get(cb): Load the target model instance asynchronously
Expand All @@ -1532,7 +1527,6 @@ BelongsTo.prototype.getAsync = function(options, cb) {
return cb.promise;
};


/**
* A hasAndBelongsToMany relation creates a direct many-to-many connection with
* another model, with no intervening model. For example, if your application
Expand Down Expand Up @@ -2443,7 +2437,6 @@ EmbedsMany.prototype.related = function(receiver, scopeParams, condOrRefresh, op
actualCond = condOrRefresh;
}


var embeddedList = this.embeddedList(receiver);

this.definition.applyScope(receiver, actualCond);
Expand Down
2 changes: 0 additions & 2 deletions lib/transaction.js
Expand Up @@ -182,5 +182,3 @@ if (Transaction) {
}

TransactionMixin.Transaction = Transaction;


2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -44,7 +44,7 @@
"debug": "^2.1.1",
"depd": "^1.0.0",
"eslint": "^2.5.3",
"eslint-config-loopback": "^1.0.0",
"eslint-config-loopback": "^2.0.0",
"inflection": "^1.6.0",
"loopback-connector": "^2.1.0",
"node-uuid": "^1.4.2",
Expand Down
1 change: 0 additions & 1 deletion support/describe-operation-hooks.js
Expand Up @@ -112,7 +112,6 @@ operations.forEach(function(op) {

p.then(report, function(err) { console.error(err.stack); });


function createOptimizedDataSource() {
var ds = new DataSource({ connector: Memory });
ds.name = 'Optimized';
Expand Down
1 change: 0 additions & 1 deletion test/basic-querying.test.js
Expand Up @@ -447,7 +447,6 @@ describe('basic-querying', function() {
});
});


it('should only include fields as specified', function(done) {
var remaining = 0;

Expand Down
2 changes: 0 additions & 2 deletions test/hooks.test.js
Expand Up @@ -439,8 +439,6 @@ describe('hooks', function() {
});
});



function addHooks(name, done) {
var called = false, random = String(Math.floor(Math.random() * 1000));
User['before' + name] = function(next, data) {
Expand Down
2 changes: 0 additions & 2 deletions test/include.test.js
Expand Up @@ -721,7 +721,6 @@ describe('include', function() {
});
});


// Not implemented correctly, see: loopback-datasource-juggler/issues/166
// fixed by DB optimization
it('should support include scope on hasAndBelongsToMany', function(done) {
Expand Down Expand Up @@ -882,7 +881,6 @@ describe('include', function() {
});
});


it('should not make n+1 db calls in relation syntax',
function(done) {
var self = this;
Expand Down
1 change: 0 additions & 1 deletion test/include_util.test.js
Expand Up @@ -75,7 +75,6 @@ describe('include_util', function() {
});
});


describe('KVMap', function() {
it('should allow to set and get value with key string', function() {
var map = new includeUtils.KVMap();
Expand Down
1 change: 0 additions & 1 deletion test/loopback-dl.test.js
Expand Up @@ -735,7 +735,6 @@ describe('Load models with base', function() {
u.should.have.property('email', 'x@y.com');
});


it('should set up base class via parent arg', function() {
var ds = new ModelBuilder();

Expand Down
1 change: 0 additions & 1 deletion test/manipulation.test.js
Expand Up @@ -1448,7 +1448,6 @@ describe('manipulation', function() {
});
});


describe('uuidv4 defaultFn', function() {
var CustomModel;

Expand Down
3 changes: 0 additions & 3 deletions test/memory.test.js
Expand Up @@ -753,7 +753,6 @@ describe('Memory connector', function() {
});
});


describe('automigrate when NO models are attached', function() {
var ds;
beforeEach(function() {
Expand Down Expand Up @@ -1011,5 +1010,3 @@ describe('Memory connector with observers', function() {
});
});
});


1 change: 0 additions & 1 deletion test/optional-validation.test.js
Expand Up @@ -136,7 +136,6 @@ describe('optional-validation', function() {
});
});


describe('no model setting', function() {

describe('method create', function() {
Expand Down
3 changes: 0 additions & 3 deletions test/persistence-hooks.suite.js
Expand Up @@ -2361,8 +2361,6 @@ module.exports = function(dataSource, should, connectorCapabilities) {
},
});



if (dataSource.connector.replaceOrCreate) {
expectedContext.where = { id: 'new-id' };
} else {
Expand Down Expand Up @@ -2980,7 +2978,6 @@ module.exports = function(dataSource, should, connectorCapabilities) {
}
});


function get(propertyName) {
return function(obj) {
return obj[propertyName];
Expand Down
8 changes: 0 additions & 8 deletions test/relations.test.js
Expand Up @@ -1271,7 +1271,6 @@ describe('relations', function() {
db.automigrate(['User', 'Follow'], done);
});


it('should set foreignKeys of through model correctly in first relation',
function(done) {
var follower = new User({ id: 1 });
Expand Down Expand Up @@ -3194,7 +3193,6 @@ describe('relations', function() {
});
});


describe('hasMany with primaryKey different from model PK', function() {
var Employee, Boss;
var COMPANY_ID = 'Company1';
Expand Down Expand Up @@ -3252,7 +3250,6 @@ describe('relations', function() {
});
});


describe('belongsTo with primaryKey different from model PK', function() {
var Employee, Boss;
var COMPANY_ID = 'Company1';
Expand Down Expand Up @@ -3428,7 +3425,6 @@ describe('relations', function() {
.catch(done);
});


it('should set targetClass on scope property', function() {
should.equal(Article.prototype.tagNames._targetClass, 'TagName');
});
Expand Down Expand Up @@ -5109,8 +5105,6 @@ describe('relations', function() {
}).catch(done);
});



it('should not allow duplicate record on scope with promises', function(done) {
Category.findOne()
.then(function(cat) {
Expand Down Expand Up @@ -5359,10 +5353,8 @@ describe('relations', function() {
})
.catch(done);
});

});


describe('custom relation/scope methods', function() {
var categoryId;

Expand Down
2 changes: 0 additions & 2 deletions test/scope.test.js
Expand Up @@ -329,10 +329,8 @@ describe('scope - filtered count, updateAll and destroyAll', function() {
});

describe('scope - dynamic target class', function() {

var Collection, Media, Image, Video;


before(function() {
db = getSchema();
Image = db.define('Image', { name: String });
Expand Down

0 comments on commit c7f34c3

Please sign in to comment.