diff --git a/package-lock.json b/package-lock.json index ee25f489..626d3bde 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3548,9 +3548,9 @@ } }, "eslint-plugin-flowtype": { - "version": "3.9.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-flowtype/-/eslint-plugin-flowtype-3.9.1.tgz", - "integrity": "sha512-ZlV6SbIXqz2ysvG0F64ZH07dqzLrwMdM1s0UNfoxdXjr4kMKuPPoLViwK+gFC952QIf341AmP4BKtKOhcB96Ug==", + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-flowtype/-/eslint-plugin-flowtype-3.10.0.tgz", + "integrity": "sha512-oh8Qu4puP0wa0EAOt8KOP/w8QJWX3VhwWIYG/6rpBpob74EmN6WHg6/FPOvqnwgVj5tozUL24skgnmBQHJDybA==", "dev": true, "requires": { "lodash": "^4.17.11" diff --git a/package.json b/package.json index 83ad2cd9..3230ece0 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "cross-env": "5.2.0", "deep-diff": "1.0.2", "eslint": "5.16.0", - "eslint-plugin-flowtype": "3.9.1", + "eslint-plugin-flowtype": "3.10.0", "flow-bin": "0.101.0", "gaze": "1.1.3", "husky": "2.4.1", diff --git a/src/Adapters/Auth/linkedin.js b/src/Adapters/Auth/linkedin.js index fdd793b5..ede1c5df 100644 --- a/src/Adapters/Auth/linkedin.js +++ b/src/Adapters/Auth/linkedin.js @@ -4,19 +4,17 @@ const httpsRequest = require('./httpsRequest'); // Returns a promise that fulfills iff this user id is valid. function validateAuthData(authData) { - return request( - 'me', - authData.access_token, - authData.is_mobile_sdk - ).then(data => { - if (data && data.id == authData.id) { - return; + return request('me', authData.access_token, authData.is_mobile_sdk).then( + data => { + if (data && data.id == authData.id) { + return; + } + throw new Parse.Error( + Parse.Error.OBJECT_NOT_FOUND, + 'Linkedin auth is invalid for this user.' + ); } - throw new Parse.Error( - Parse.Error.OBJECT_NOT_FOUND, - 'Linkedin auth is invalid for this user.' - ); - }); + ); } // Returns a promise that fulfills iff this app id is valid. diff --git a/src/RestWrite.js b/src/RestWrite.js index e3db4853..2622b62d 100644 --- a/src/RestWrite.js +++ b/src/RestWrite.js @@ -787,9 +787,7 @@ RestWrite.prototype._validatePasswordHistory = function() { return Promise.reject( new Parse.Error( Parse.Error.VALIDATION_ERROR, - `New password should not be the same as last ${ - this.config.passwordPolicy.maxPasswordHistory - } passwords.` + `New password should not be the same as last ${this.config.passwordPolicy.maxPasswordHistory} passwords.` ) ); throw err;