зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1330791 - Enable the no-unreachable rule for eslint in /services and fix the associated errors. r=markh
MozReview-Commit-ID: e60hfjiUmS --HG-- extra : rebase_source : 5d6d804683d45c7e08bac19ffa7d04a56c298adb
This commit is contained in:
Родитель
41155f0fea
Коммит
e4956c0ce7
|
@ -17,6 +17,5 @@ module.exports = {
|
|||
"no-nested-ternary": "warn",
|
||||
"no-octal": "warn",
|
||||
"no-redeclare": "warn",
|
||||
"no-unreachable": "warn",
|
||||
}
|
||||
};
|
||||
|
|
|
@ -343,14 +343,11 @@ this.FxAccountsClient.prototype = {
|
|||
switch (expectedError.errno) {
|
||||
case ERRNO_ACCOUNT_DOES_NOT_EXIST:
|
||||
return false;
|
||||
break;
|
||||
case ERRNO_INCORRECT_PASSWORD:
|
||||
return true;
|
||||
break;
|
||||
default:
|
||||
// not so expected, any more ...
|
||||
throw expectedError;
|
||||
break;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
|
|
@ -135,7 +135,6 @@ FxAccountsPushService.prototype = {
|
|||
return this.unsubscribe().catch(err => {
|
||||
this.log.error("Error during unsubscribe", err);
|
||||
});
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -169,11 +168,9 @@ FxAccountsPushService.prototype = {
|
|||
break;
|
||||
case ON_DEVICE_DISCONNECTED_NOTIFICATION:
|
||||
return this.fxAccounts.handleDeviceDisconnection(payload.data.id);
|
||||
break;
|
||||
case ON_PASSWORD_CHANGED_NOTIFICATION:
|
||||
case ON_PASSWORD_RESET_NOTIFICATION:
|
||||
return this._onPasswordChanged();
|
||||
break;
|
||||
case ON_COLLECTION_CHANGED_NOTIFICATION:
|
||||
Services.obs.notifyObservers(null, ON_COLLECTION_CHANGED_NOTIFICATION, payload.data.collections);
|
||||
default:
|
||||
|
|
|
@ -618,7 +618,6 @@ add_task(function* test_accountExists() {
|
|||
|
||||
default:
|
||||
throw new Error("Unexpected login from " + jsonBody.email);
|
||||
break;
|
||||
}
|
||||
},
|
||||
});
|
||||
|
|
Загрузка…
Ссылка в новой задаче