repaired ESLint to work everywhere, plus refactor on all package.json's that included ESLint dependencies.
This commit is contained in:
parent
6c3ac042f1
commit
e20dd82928
|
@ -1,4 +1,4 @@
|
|||
extends: google
|
||||
extends: [eslint:recommended, google]
|
||||
installedESLint: true
|
||||
rules:
|
||||
indent: [error, 4]
|
||||
|
|
|
@ -30,9 +30,10 @@
|
|||
"cors": "^2.8.1",
|
||||
"css-loader": "^0.25.0",
|
||||
"del": "^2.2.2",
|
||||
"eslint": "^3.16.1",
|
||||
"eslint": "^3.19.0",
|
||||
"eslint-config-angular": "^0.5.0",
|
||||
"eslint-config-google": "^0.6.0",
|
||||
"eslint-config-loopback": "^4.0.0",
|
||||
"eslint-config-xo": "^0.17.0",
|
||||
"eslint-plugin-angular": "^1.4.1",
|
||||
"file-loader": "^0.9.0",
|
||||
|
|
|
@ -21,8 +21,6 @@
|
|||
"strong-error-handler": "^2.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^2.13.1",
|
||||
"eslint-config-loopback": "^4.0.0",
|
||||
"nsp": "^2.1.0"
|
||||
},
|
||||
"repository": {
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
var app = require('../../../server/server');
|
||||
|
||||
module.exports = function(Client){
|
||||
module.exports = function(Client) {
|
||||
Client.remoteMethod('createUserProfile', {
|
||||
description: 'Creates both client and its web account',
|
||||
accepts: {
|
||||
arg: 'data',
|
||||
type: 'object',
|
||||
http: { source: 'body' }
|
||||
http: {source: 'body'}
|
||||
},
|
||||
returns: {
|
||||
root: true,
|
||||
|
@ -26,11 +26,11 @@ module.exports = function(Client){
|
|||
password: parseInt(Math.random() * 100000000000000)
|
||||
};
|
||||
|
||||
app.models.Account.beginTransaction('READ COMMITTED', (err, transaction) => {
|
||||
app.models.Account.create(user, {transaction}, (err, account) => {
|
||||
if (err) {
|
||||
app.models.Account.beginTransaction('READ COMMITTED', (error, transaction) => {
|
||||
app.models.Account.create(user, {transaction}, (error, account) => {
|
||||
if (error) {
|
||||
transaction.rollback();
|
||||
return callback(err);
|
||||
return callback(error);
|
||||
}
|
||||
|
||||
let client = {
|
||||
|
@ -41,10 +41,10 @@ module.exports = function(Client){
|
|||
email: data.email
|
||||
};
|
||||
|
||||
Client.create(client, {transaction}, (err, client) => {
|
||||
if (err) {
|
||||
Client.create(client, {transaction}, (error, client) => {
|
||||
if (error) {
|
||||
transaction.rollback();
|
||||
return callback(err);
|
||||
return callback(error);
|
||||
}
|
||||
|
||||
transaction.commit();
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
"version": "1.0.0",
|
||||
"main": "server/server.js",
|
||||
"scripts": {
|
||||
"lint": "eslint .",
|
||||
"start": "node .",
|
||||
"posttest": "npm run lint && nsp check"
|
||||
},
|
||||
|
@ -21,8 +20,6 @@
|
|||
"strong-error-handler": "^2.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^2.13.1",
|
||||
"eslint-config-loopback": "^4.0.0",
|
||||
"nsp": "^2.1.0"
|
||||
},
|
||||
"repository": {
|
||||
|
|
|
@ -22,8 +22,6 @@
|
|||
"strong-error-handler": "^2.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^2.13.1",
|
||||
"eslint-config-loopback": "^4.0.0",
|
||||
"nsp": "^2.1.0"
|
||||
},
|
||||
"repository": {
|
||||
|
|
|
@ -21,8 +21,6 @@
|
|||
"strong-error-handler": "^2.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^2.13.1",
|
||||
"eslint-config-loopback": "^4.0.0",
|
||||
"nsp": "^2.1.0"
|
||||
},
|
||||
"repository": {
|
||||
|
|
Loading…
Reference in New Issue