зеркало из https://github.com/mozilla/treeherder.git
Bug 1505758 - Fix/enable ESLint 'no-else-return'
https://eslint.org/docs/rules/no-else-return
This commit is contained in:
Родитель
6d18047fd6
Коммит
b9d70dfffd
|
@ -31,7 +31,6 @@ module.exports = {
|
|||
'max-len': 'off',
|
||||
'no-alert': 'off',
|
||||
'no-continue': 'off',
|
||||
'no-else-return': 'off',
|
||||
'no-mixed-operators': 'off',
|
||||
'no-nested-ternary': 'off',
|
||||
'no-param-reassign': 'off',
|
||||
|
|
|
@ -171,7 +171,9 @@ class PinBoard extends React.Component {
|
|||
cancelAllPinnedJobsTitle() {
|
||||
if (!this.props.isLoggedIn) {
|
||||
return 'Not logged in';
|
||||
} else if (!this.canCancelAllPinnedJobs()) {
|
||||
}
|
||||
|
||||
if (!this.canCancelAllPinnedJobs()) {
|
||||
return 'No pending / running jobs in pinBoard';
|
||||
}
|
||||
|
||||
|
|
|
@ -114,16 +114,24 @@ class ErrorLine extends React.Component {
|
|||
if (!selectedOption) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!this.canClassify) {
|
||||
return 'classification-disabled';
|
||||
} else if (this.props.errorLine.verified) {
|
||||
}
|
||||
|
||||
if (this.props.errorLine.verified) {
|
||||
return 'verified';
|
||||
} else if (selectedOption.type === 'ignore') {
|
||||
}
|
||||
|
||||
if (selectedOption.type === 'ignore') {
|
||||
return 'unverified-ignore';
|
||||
} else if (selectedOption.type === 'manual' &&
|
||||
}
|
||||
|
||||
if (selectedOption.type === 'manual' &&
|
||||
!selectedOption.manualBugNumber) {
|
||||
return 'unverified-no-bug';
|
||||
}
|
||||
|
||||
return 'unverified';
|
||||
}
|
||||
|
||||
|
|
|
@ -29,7 +29,9 @@ perf.controller('CompareChooserCtrl', [
|
|||
const getParameter = function (paramName, defaultValue) {
|
||||
if ($stateParams[paramName]) {
|
||||
return $stateParams[paramName];
|
||||
} else if (localStorageService.get(paramName)) {
|
||||
}
|
||||
|
||||
if (localStorageService.get(paramName)) {
|
||||
return localStorageService.get(paramName);
|
||||
}
|
||||
return defaultValue;
|
||||
|
|
|
@ -246,7 +246,9 @@ export default class FilterModel {
|
|||
_getJobFieldValue(job, field) {
|
||||
if (field === 'platform') {
|
||||
return `${thPlatformMap[job.platform] || job.platform} ${job.platform_option}`;
|
||||
} else if (field === 'searchStr') {
|
||||
}
|
||||
|
||||
if (field === 'searchStr') {
|
||||
// lazily get this to avoid storing redundant information
|
||||
return job.getSearchStr();
|
||||
}
|
||||
|
|
|
@ -14,7 +14,9 @@ export default class TreeStatusModel {
|
|||
.then(async (resp) => {
|
||||
if (resp.ok) {
|
||||
return resp.json();
|
||||
} else if (resp.status === 404) {
|
||||
}
|
||||
|
||||
if (resp.status === 404) {
|
||||
return Promise.resolve({
|
||||
result: {
|
||||
status: 'unsupported',
|
||||
|
|
Загрузка…
Ссылка в новой задаче