Skip to content

Commit 80d2264

Browse files
authored
Merge pull request #1179 from strongloop/update/eslint
Upgrade eslint & config to latest
2 parents 64517b5 + 0f7a567 commit 80d2264

19 files changed

+32
-9
lines changed

examples/datasource-app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ Article.create(function(e, article) {
107107
// should be able to attach a data source to an existing model
108108
var modelBuilder = new ModelBuilder();
109109

110-
Color = modelBuilder.define('Color', {
110+
const Color = modelBuilder.define('Color', {
111111
name: String,
112112
});
113113

lib/connectors/memory.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
'use strict';
77

8+
/* global window:false */
89
var g = require('strong-globalize')();
910
var util = require('util');
1011
var Connector = require('loopback-connector').Connector;
@@ -823,7 +824,7 @@ Memory.prototype.replaceOrCreate = function(model, data, options, callback) {
823824
// Calling _createSync to update the collection in a sync way and
824825
// to guarantee to create it in the same turn of even loop
825826
return self._createSync(model, data, function(err, id) {
826-
if (err) return process.nextTick(function() { cb(err); });
827+
if (err) return process.nextTick(function() { callback(err); });
827828
self.saveToFile(id, function(err, id) {
828829
self.setIdValue(model, data, id);
829830
callback(err, self.fromDb(model, data), {isNewInstance: true});

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
},
3434
"devDependencies": {
3535
"async-iterators": "^0.2.2",
36-
"eslint": "^2.13.1",
37-
"eslint-config-loopback": "^4.0.0",
36+
"eslint": "^3.11.1",
37+
"eslint-config-loopback": "^6.0.0",
3838
"mocha": "^2.1.0",
3939
"should": "^8.0.2"
4040
},

test/basic-querying.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
// This test written in mocha+should.js
77
'use strict';
88

9+
/* global getSchema:false, connectorCapabilities:false */
910
var should = require('./init.js');
1011
var async = require('async');
1112
var db, User;

test/crud-with-options.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
// This test written in mocha+should.js
77
'use strict';
88

9+
/* global getSchema:false */
910
var should = require('./init.js');
1011
var async = require('async');
1112
var db, User, options, filter;

test/datatype.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
// This test written in mocha+should.js
77
'use strict';
88

9+
/* global getSchema:false */
910
var should = require('./init.js');
1011

1112
var db, Model;

test/default-scope.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
// This test written in mocha+should.js
77
'use strict';
88

9+
/* global getSchema:false */
910
var should = require('./init.js');
1011
var async = require('async');
1112

test/defaults.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
// This test written in mocha+should.js
77
'use strict';
88

9+
/* global getSchema:false */
910
var should = require('./init.js');
1011

1112
var db = getSchema();

test/hooks.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
'use strict';
77

88
// This test written in mocha+should.js
9+
/* global getSchema:false */
910
var should = require('./init.js');
1011

1112
var j = require('../'),

test/include.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
'use strict';
77

8+
/* global getSchema:false */
89
var should = require('./init.js');
910
var async = require('async');
1011
var assert = require('assert');

0 commit comments

Comments
 (0)