Merge pull request #3002 from strongloop/eslint-es6

Upgrade eslint config and grunt-eslint to latest
This commit is contained in:
Miroslav Bajtoš 2016-12-07 10:52:52 +01:00 committed by GitHub
commit 7f2cdc106c
9 changed files with 56 additions and 52 deletions

View File

@ -1,5 +1,8 @@
{
"extends": "loopback",
"parserOptions": {
"ecmaVersion": 5
},
"rules": {
"max-len": ["error", 100, 4, {
"ignoreComments": true,

View File

@ -17,8 +17,9 @@ var Application = models.Application(dataSource);
app.model(Application);
var data = {pushSettings: [
{'platform': 'apns',
var data = {
pushSettings: [{
'platform': 'apns',
'apns': {
'pushOptions': {
'gateway': 'gateway.sandbox.push.apple.com',
@ -33,8 +34,9 @@ var data = {pushSettings: [
'batchFeedback': true,
'interval': 300,
},
}},
]};
},
}],
};
Application.create(data, function(err, data) {
g.log('Created: %s', data.toObject());

View File

@ -68,14 +68,14 @@
"cookie-parser": "^1.3.4",
"dirty-chai": "^1.2.2",
"es5-shim": "^4.1.0",
"eslint-config-loopback": "^5.0.0",
"eslint-config-loopback": "^6.0.0",
"express-session": "^1.14.0",
"grunt": "^1.0.1",
"grunt-browserify": "^5.0.0",
"grunt-cli": "^1.2.0",
"grunt-contrib-uglify": "^2.0.0",
"grunt-contrib-watch": "^1.0.0",
"grunt-eslint": "^18.1.0",
"grunt-eslint": "^19.0.0",
"grunt-karma": "^2.0.0",
"grunt-mocha-test": "^0.12.7",
"karma": "^1.1.2",

View File

@ -65,7 +65,8 @@ describe('Application', function() {
});
it('Create a new application with push settings', function(done) {
Application.create({owner: 'rfeng',
Application.create({
owner: 'rfeng',
name: 'MyAppWithPush',
description: 'My push mobile application',
pushSettings: {

View File

@ -139,8 +139,7 @@ describe('loopback.rest', function() {
it('allows models to provide a custom HTTP path', function(done) {
var CustomModel = app.registry.createModel('CustomModel',
{name: String},
{http: {'path': 'domain1/CustomModelPath'},
});
{http: {'path': 'domain1/CustomModelPath'}});
app.model(CustomModel, {dataSource: 'db'});
app.use(loopback.rest());
@ -151,8 +150,7 @@ describe('loopback.rest', function() {
it('should report 200 for url-encoded HTTP path', function(done) {
var CustomModel = app.registry.createModel('CustomModel',
{name: String},
{http: {path: 'domain%20one/CustomModelPath'},
});
{http: {path: 'domain%20one/CustomModelPath'}});
app.model(CustomModel, {dataSource: 'db'});
app.use(loopback.rest());