зеркало из https://github.com/mozilla/treeherder.git
Bug 1369122 - Enable eslint comma-spacing rule (#2522)
This commit is contained in:
Родитель
77c41ae7d0
Коммит
e53a3393a2
|
@ -28,6 +28,7 @@ module.exports = neutrino => {
|
|||
extends: 'eslint:recommended',
|
||||
rules: {
|
||||
'accessor-pairs': 'error',
|
||||
'comma-spacing': 'error',
|
||||
'comma-style': 'error',
|
||||
'eol-last': 'error',
|
||||
'eqeqeq': 'error',
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
admin.controller('AdminCtrl', [
|
||||
'$scope', 'ThBuildPlatformModel', 'ThJobTypeModel', 'ThRepositoryModel',
|
||||
'ThOptionCollectionModel', 'ThJobExclusionModel', '$state',
|
||||
'$q','ThExclusionProfileModel',
|
||||
'$q', 'ThExclusionProfileModel',
|
||||
function AdminCtrl(
|
||||
$scope, ThBuildPlatformModel, ThJobTypeModel, ThRepositoryModel,
|
||||
ThOptionCollectionModel, ThJobExclusionModel, $state,
|
||||
|
|
|
@ -405,7 +405,7 @@ treeherder.controller('BugFilerCtrl', [
|
|||
* Disable or enable form elements as needed at various points in the submission process
|
||||
*/
|
||||
$scope.toggleForm = function (disabled) {
|
||||
$(':input','#modalForm').attr("disabled", disabled);
|
||||
$(':input', '#modalForm').attr("disabled", disabled);
|
||||
};
|
||||
}
|
||||
]);
|
||||
|
|
|
@ -7,7 +7,7 @@ perf.factory('PhBugs', [
|
|||
fileBug: function (alertSummary) {
|
||||
$http.get(thServiceDomain + '/api/performance/bug-template/?framework=' + alertSummary.framework).then(function (response) {
|
||||
var template = response.data[0];
|
||||
var repo = _.find($rootScope.repos,{ name: alertSummary.repository });
|
||||
var repo = _.find($rootScope.repos, { name: alertSummary.repository });
|
||||
var compiledText = $interpolate(template.text)({
|
||||
revisionHref: repo.getPushLogHref(alertSummary.resultSetMetadata.revision),
|
||||
alertHref: window.location.origin + '/perf.html#/alerts?id=' +
|
||||
|
@ -103,8 +103,8 @@ perf.controller(
|
|||
|
||||
perf.controller(
|
||||
'ReassignAlertsCtrl', ['$scope', '$uibModalInstance', '$http', '$q', 'alertSummary',
|
||||
'allAlertSummaries','PhAlerts', 'phAlertStatusMap',
|
||||
function ($scope, $uibModalInstance,$http, $q, alertSummary, allAlertSummaries, PhAlerts, phAlertStatusMap) {
|
||||
'allAlertSummaries', 'PhAlerts', 'phAlertStatusMap',
|
||||
function ($scope, $uibModalInstance, $http, $q, alertSummary, allAlertSummaries, PhAlerts, phAlertStatusMap) {
|
||||
|
||||
$scope.title = "Reassign alerts";
|
||||
$scope.placeholder = "Alert #";
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
"use strict";
|
||||
|
||||
perf.controller('CompareChooserCtrl', [
|
||||
'$state', '$stateParams', '$scope','$q', 'ThRepositoryModel', 'ThResultSetModel',
|
||||
'$state', '$stateParams', '$scope', '$q', 'ThRepositoryModel', 'ThResultSetModel',
|
||||
'phCompareDefaultNewRepo', 'phCompareDefaultOriginalRepo', 'JsonPushes',
|
||||
'thPerformanceBranches','localStorageService', 'compareBaseLineDefaultTimeRange',
|
||||
'thPerformanceBranches', 'localStorageService', 'compareBaseLineDefaultTimeRange',
|
||||
function CompareChooserCtrl($state, $stateParams, $scope, $q,
|
||||
ThRepositoryModel, ThResultSetModel,
|
||||
phCompareDefaultNewRepo,
|
||||
|
@ -180,8 +180,8 @@ perf.controller('CompareChooserCtrl', [
|
|||
perf.controller('CompareResultsCtrl', [
|
||||
'$state', '$stateParams', '$scope', '$rootScope', '$location',
|
||||
'thServiceDomain', 'ThRepositoryModel',
|
||||
'ThResultSetModel', '$http', '$httpParamSerializer','$q', '$timeout', 'PhFramework', 'PhSeries',
|
||||
'math', 'phTimeRanges', 'PhCompare','compareBaseLineDefaultTimeRange',
|
||||
'ThResultSetModel', '$http', '$httpParamSerializer', '$q', '$timeout', 'PhFramework', 'PhSeries',
|
||||
'math', 'phTimeRanges', 'PhCompare', 'compareBaseLineDefaultTimeRange',
|
||||
function CompareResultsCtrl($state, $stateParams, $scope,
|
||||
$rootScope, $location,
|
||||
thServiceDomain,
|
||||
|
|
|
@ -744,8 +744,8 @@ perf.controller('GraphsCtrl', [
|
|||
var zoomString = decodeURIComponent($stateParams.zoom).replace(/[\[\{\}\]"]+/g, '');
|
||||
var zoomArray = zoomString.split(",");
|
||||
var zoomObject = {
|
||||
"x": zoomArray.slice(0,2),
|
||||
"y": zoomArray.slice(2,4)
|
||||
"x": zoomArray.slice(0, 2),
|
||||
"y": zoomArray.slice(2, 4)
|
||||
};
|
||||
$scope.zoom = (zoomString) ? zoomObject : [];
|
||||
} else {
|
||||
|
|
|
@ -21,7 +21,7 @@ treeherder.factory('ThExclusionProfileModel', [
|
|||
options = options || {};
|
||||
cache = cache || false;
|
||||
var query_string = $.param(options);
|
||||
return $http.get(ThExclusionProfileModel.get_uri()+"?"+query_string,{
|
||||
return $http.get(ThExclusionProfileModel.get_uri()+"?"+query_string, {
|
||||
cache: cache
|
||||
})
|
||||
.then(function (response) {
|
||||
|
@ -60,7 +60,7 @@ treeherder.factory('ThExclusionProfileModel', [
|
|||
} else if (reason.data && reason.data.detail) {
|
||||
thNotify.send(reason.data.detail, "danger");
|
||||
} else {
|
||||
thNotify.send("Error","danger");
|
||||
thNotify.send("Error", "danger");
|
||||
$log.error(reason);
|
||||
}
|
||||
return $q.reject(reason);
|
||||
|
@ -87,7 +87,7 @@ treeherder.factory('ThExclusionProfileModel', [
|
|||
});
|
||||
});
|
||||
} else {
|
||||
thNotify.send(reason,"danger");
|
||||
thNotify.send(reason, "danger");
|
||||
}
|
||||
return $q.reject(reason);
|
||||
}
|
||||
|
@ -104,7 +104,7 @@ treeherder.factory('ThExclusionProfileModel', [
|
|||
thNotify.send("Exclusion profile successfully deleted", "success");
|
||||
},
|
||||
function (reason) {
|
||||
thNotify.send(reason.data,"danger");
|
||||
thNotify.send(reason.data, "danger");
|
||||
return $q.reject(reason);
|
||||
}
|
||||
);
|
||||
|
|
|
@ -60,7 +60,7 @@ treeherder.factory('ThJobModel', [
|
|||
// list endpoint.
|
||||
var uri = config.uri || ThJobModel.get_uri(repoName);
|
||||
|
||||
return $http.get(uri,{
|
||||
return $http.get(uri, {
|
||||
params: options,
|
||||
timeout: timeout
|
||||
}).
|
||||
|
|
|
@ -58,7 +58,7 @@ treeherder.factory('ThJobExclusionModel', [
|
|||
});
|
||||
});
|
||||
} else {
|
||||
thNotify.send(reason,"danger");
|
||||
thNotify.send(reason, "danger");
|
||||
}
|
||||
return $q.reject(reason);
|
||||
}
|
||||
|
@ -85,7 +85,7 @@ treeherder.factory('ThJobExclusionModel', [
|
|||
});
|
||||
});
|
||||
} else {
|
||||
thNotify.send(reason,"danger");
|
||||
thNotify.send(reason, "danger");
|
||||
}
|
||||
return $q.reject(reason);
|
||||
}
|
||||
|
@ -102,7 +102,7 @@ treeherder.factory('ThJobExclusionModel', [
|
|||
thNotify.send("Job filter successfully deleted", "success");
|
||||
},
|
||||
function (reason) {
|
||||
thNotify.send(reason.data,"danger");
|
||||
thNotify.send(reason.data, "danger");
|
||||
return $q.reject(reason);
|
||||
}
|
||||
);
|
||||
|
|
|
@ -20,7 +20,7 @@ treeherder.factory('ThJobTypeModel', [
|
|||
ThJobTypeModel.get_list = function (options) {
|
||||
// a static method to retrieve a list of ThJobTypeModel
|
||||
options = options || {};
|
||||
return $http.get(ThJobTypeModel.get_uri(),{
|
||||
return $http.get(ThJobTypeModel.get_uri(), {
|
||||
cache: true,
|
||||
params: options
|
||||
}).
|
||||
|
|
|
@ -638,7 +638,7 @@ treeherder.factory('ThResultSetStore', [
|
|||
unavailableJobs.push.apply(unavailableJobs, ids_unfetched);
|
||||
}
|
||||
return jobsFetched;
|
||||
},error_callback)
|
||||
}, error_callback)
|
||||
.then(_.bind(updateJobs, $rootScope, repoName));
|
||||
}
|
||||
// retry to fetch the unfetched jobs later
|
||||
|
|
|
@ -22,7 +22,7 @@ treeherder.factory('ThUserModel', [
|
|||
return (response.data.length > 0) ? new ThUserModel(response.data[0]) : {};
|
||||
},
|
||||
function (reason) {
|
||||
thNotify.send(reason.data,"danger");
|
||||
thNotify.send(reason.data, "danger");
|
||||
return $q.reject(reason);
|
||||
});
|
||||
};
|
||||
|
|
|
@ -19,9 +19,10 @@
|
|||
<div class="input-group-btn">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
Recent <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu dropdown-menu-right" ng-model="tipRevision">
|
||||
<ul class="dropdown-menu dropdown-menu-right" ng-model="tipRevision">
|
||||
<li ng-repeat="tip in originalTipList"><a ng-click="getOriginalTipRevision(tip.revision)">{{tip.revision | limitTo: 12}} {{tip.author}}</a></li>
|
||||
</ul>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -468,7 +468,7 @@ treeherder.controller('PluginCtrl', [
|
|||
"to fill in gaps where the job was not run";
|
||||
} else {
|
||||
// Cut off trailing "/ " if one exists, capitalize first letter
|
||||
title = title.replace(/\/ $/,"");
|
||||
title = title.replace(/\/ $/, "");
|
||||
title = title.replace(/^./, function (l) { return l.toUpperCase(); });
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
treeherder.controller('BugsPluginCtrl', [
|
||||
'$scope', '$rootScope', 'ThLog', 'ThTextLogStepModel',
|
||||
'ThBugSuggestionsModel', 'thPinboard', 'thEvents','$q',
|
||||
'ThBugSuggestionsModel', 'thPinboard', 'thEvents', '$q',
|
||||
'thTabs', '$timeout', 'thUrl', '$uibModal', '$location',
|
||||
function BugsPluginCtrl(
|
||||
$scope, $rootScope, ThLog, ThTextLogStepModel, ThBugSuggestionsModel,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
treeherder.controller('PinboardCtrl', [
|
||||
'$scope', '$rootScope', '$document', '$timeout','thEvents', 'thPinboard', 'thNotify', 'ThLog',
|
||||
'$scope', '$rootScope', '$document', '$timeout', 'thEvents', 'thPinboard', 'thNotify', 'ThLog',
|
||||
function PinboardCtrl(
|
||||
$scope, $rootScope, $document, $timeout, thEvents, thPinboard, thNotify, ThLog) {
|
||||
|
||||
|
@ -196,7 +196,7 @@ treeherder.controller('PinboardCtrl', [
|
|||
title = "Save " + category + " data";
|
||||
} else {
|
||||
// Cut off trailing "/ " if one exists, capitalize first letter
|
||||
title = title.replace(/\/ $/,"");
|
||||
title = title.replace(/\/ $/, "");
|
||||
title = title.replace(/^./, function (l) { return l.toUpperCase(); });
|
||||
}
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ treeherder.controller('SimilarJobsPluginCtrl', [
|
|||
thTabs.tabs.similarJobs.is_loading = false;
|
||||
},
|
||||
function () {
|
||||
thNotify.send("Error fetching pushes for similar jobs","danger");
|
||||
thNotify.send("Error fetching pushes for similar jobs", "danger");
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
Загрузка…
Ссылка в новой задаче