Merge pull request #3002 from strongloop/eslint-es6
Upgrade eslint config and grunt-eslint to latest
This commit is contained in:
commit
7f2cdc106c
|
@ -1,5 +1,8 @@
|
||||||
{
|
{
|
||||||
"extends": "loopback",
|
"extends": "loopback",
|
||||||
|
"parserOptions": {
|
||||||
|
"ecmaVersion": 5
|
||||||
|
},
|
||||||
"rules": {
|
"rules": {
|
||||||
"max-len": ["error", 100, 4, {
|
"max-len": ["error", 100, 4, {
|
||||||
"ignoreComments": true,
|
"ignoreComments": true,
|
||||||
|
|
|
@ -17,8 +17,9 @@ var Application = models.Application(dataSource);
|
||||||
|
|
||||||
app.model(Application);
|
app.model(Application);
|
||||||
|
|
||||||
var data = {pushSettings: [
|
var data = {
|
||||||
{'platform': 'apns',
|
pushSettings: [{
|
||||||
|
'platform': 'apns',
|
||||||
'apns': {
|
'apns': {
|
||||||
'pushOptions': {
|
'pushOptions': {
|
||||||
'gateway': 'gateway.sandbox.push.apple.com',
|
'gateway': 'gateway.sandbox.push.apple.com',
|
||||||
|
@ -33,8 +34,9 @@ var data = {pushSettings: [
|
||||||
'batchFeedback': true,
|
'batchFeedback': true,
|
||||||
'interval': 300,
|
'interval': 300,
|
||||||
},
|
},
|
||||||
}},
|
},
|
||||||
]};
|
}],
|
||||||
|
};
|
||||||
|
|
||||||
Application.create(data, function(err, data) {
|
Application.create(data, function(err, data) {
|
||||||
g.log('Created: %s', data.toObject());
|
g.log('Created: %s', data.toObject());
|
||||||
|
|
|
@ -68,14 +68,14 @@
|
||||||
"cookie-parser": "^1.3.4",
|
"cookie-parser": "^1.3.4",
|
||||||
"dirty-chai": "^1.2.2",
|
"dirty-chai": "^1.2.2",
|
||||||
"es5-shim": "^4.1.0",
|
"es5-shim": "^4.1.0",
|
||||||
"eslint-config-loopback": "^5.0.0",
|
"eslint-config-loopback": "^6.0.0",
|
||||||
"express-session": "^1.14.0",
|
"express-session": "^1.14.0",
|
||||||
"grunt": "^1.0.1",
|
"grunt": "^1.0.1",
|
||||||
"grunt-browserify": "^5.0.0",
|
"grunt-browserify": "^5.0.0",
|
||||||
"grunt-cli": "^1.2.0",
|
"grunt-cli": "^1.2.0",
|
||||||
"grunt-contrib-uglify": "^2.0.0",
|
"grunt-contrib-uglify": "^2.0.0",
|
||||||
"grunt-contrib-watch": "^1.0.0",
|
"grunt-contrib-watch": "^1.0.0",
|
||||||
"grunt-eslint": "^18.1.0",
|
"grunt-eslint": "^19.0.0",
|
||||||
"grunt-karma": "^2.0.0",
|
"grunt-karma": "^2.0.0",
|
||||||
"grunt-mocha-test": "^0.12.7",
|
"grunt-mocha-test": "^0.12.7",
|
||||||
"karma": "^1.1.2",
|
"karma": "^1.1.2",
|
||||||
|
|
|
@ -65,7 +65,8 @@ describe('Application', function() {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Create a new application with push settings', function(done) {
|
it('Create a new application with push settings', function(done) {
|
||||||
Application.create({owner: 'rfeng',
|
Application.create({
|
||||||
|
owner: 'rfeng',
|
||||||
name: 'MyAppWithPush',
|
name: 'MyAppWithPush',
|
||||||
description: 'My push mobile application',
|
description: 'My push mobile application',
|
||||||
pushSettings: {
|
pushSettings: {
|
||||||
|
|
|
@ -139,8 +139,7 @@ describe('loopback.rest', function() {
|
||||||
it('allows models to provide a custom HTTP path', function(done) {
|
it('allows models to provide a custom HTTP path', function(done) {
|
||||||
var CustomModel = app.registry.createModel('CustomModel',
|
var CustomModel = app.registry.createModel('CustomModel',
|
||||||
{name: String},
|
{name: String},
|
||||||
{http: {'path': 'domain1/CustomModelPath'},
|
{http: {'path': 'domain1/CustomModelPath'}});
|
||||||
});
|
|
||||||
|
|
||||||
app.model(CustomModel, {dataSource: 'db'});
|
app.model(CustomModel, {dataSource: 'db'});
|
||||||
app.use(loopback.rest());
|
app.use(loopback.rest());
|
||||||
|
@ -151,8 +150,7 @@ describe('loopback.rest', function() {
|
||||||
it('should report 200 for url-encoded HTTP path', function(done) {
|
it('should report 200 for url-encoded HTTP path', function(done) {
|
||||||
var CustomModel = app.registry.createModel('CustomModel',
|
var CustomModel = app.registry.createModel('CustomModel',
|
||||||
{name: String},
|
{name: String},
|
||||||
{http: {path: 'domain%20one/CustomModelPath'},
|
{http: {path: 'domain%20one/CustomModelPath'}});
|
||||||
});
|
|
||||||
|
|
||||||
app.model(CustomModel, {dataSource: 'db'});
|
app.model(CustomModel, {dataSource: 'db'});
|
||||||
app.use(loopback.rest());
|
app.use(loopback.rest());
|
||||||
|
|
Loading…
Reference in New Issue