Enable no-multi-spaces
Enable the no-multi-spaces rule, and correct linting errors where found. Change-Id: Ia7ed2a35d69b455e92849df2ccde9d9cf8e7a104
This commit is contained in:
parent
bfa5c71de3
commit
1dd3a7fd5b
|
@ -28,7 +28,6 @@ rules:
|
|||
valid-jsdoc: 1
|
||||
no-undefined: 1
|
||||
brace-style: 1
|
||||
no-multi-spaces: 1
|
||||
no-unused-vars: 1
|
||||
strict: 1
|
||||
no-extra-parens: 1
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
.module('horizon.framework.util.promise-toggle')
|
||||
.directive('hzPromiseToggleMock', hzPromiseToggleMock);
|
||||
|
||||
hzPromiseToggleMock.$inject = [
|
||||
hzPromiseToggleMock.$inject = [
|
||||
'hzPromiseToggleTemplateDirective',
|
||||
'mockService'
|
||||
];
|
||||
|
|
|
@ -19,10 +19,10 @@
|
|||
|
||||
$scope.count = 0;
|
||||
|
||||
var markup = '<form name="testForm">' +
|
||||
var markup = '<form name="testForm">' +
|
||||
'<input type="text" name="count" ng-model="count" ' +
|
||||
'validate-number-max="1"/>' +
|
||||
'</form>';
|
||||
'</form>';
|
||||
|
||||
$compile(angular.element(markup))($scope);
|
||||
$form = $scope.testForm;
|
||||
|
@ -59,10 +59,10 @@
|
|||
|
||||
$scope.count = 0;
|
||||
|
||||
var markup = '<form name="testForm">' +
|
||||
var markup = '<form name="testForm">' +
|
||||
'<input type="text" name="count" ng-model="count" ' +
|
||||
'validate-number-min="1"/>' +
|
||||
'</form>';
|
||||
'</form>';
|
||||
|
||||
$compile(angular.element(markup))($scope);
|
||||
$form = $scope.testForm;
|
||||
|
|
|
@ -215,7 +215,7 @@
|
|||
return basePath + 'action-list/actions-' + action.template.type + '.template.html';
|
||||
} else {
|
||||
// determine the template by `listType` which can be row or batch
|
||||
return basePath + 'action-list/actions-' + listType + '.template.html';
|
||||
return basePath + 'action-list/actions-' + listType + '.template.html';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
beforeEach(module('horizon.framework'));
|
||||
beforeEach(inject(function ($injector) {
|
||||
headersBasePath = $injector.get('horizon.framework.widgets.headers.basePath');
|
||||
staticUrl = $injector.get('$window').STATIC_URL;
|
||||
staticUrl = $injector.get('$window').STATIC_URL;
|
||||
}));
|
||||
|
||||
it('should be defined', function () {
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
* ```
|
||||
*/
|
||||
function magicOverrides() {
|
||||
var directive = {
|
||||
var directive = {
|
||||
restrict: 'A',
|
||||
controller: MagicOverridesController
|
||||
};
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
*
|
||||
*/
|
||||
function hzTable() {
|
||||
var directive = {
|
||||
var directive = {
|
||||
restrict: 'A',
|
||||
require: 'stTable',
|
||||
scope: true,
|
||||
|
|
|
@ -140,7 +140,7 @@ horizon.membership = {
|
|||
for (role in membership) {
|
||||
if (membership.hasOwnProperty(role)) {
|
||||
horizon.membership.remove_member(
|
||||
step_slug, data_id, role, membership[role]
|
||||
step_slug, data_id, role, membership[role]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -249,7 +249,7 @@ horizon.membership = {
|
|||
$(".available_" + step_slug + ", ." + step_slug + "_members").on('click', ".btn-group a[href='#add_remove']", function (evt) {
|
||||
evt.preventDefault();
|
||||
var available = $(".available_" + step_slug).has($(this)).length;
|
||||
var data_id = horizon.membership.get_field_id($(this).parent().siblings().attr('data-' + step_slug + '-id'));
|
||||
var data_id = horizon.membership.get_field_id($(this).parent().siblings().attr('data-' + step_slug + '-id'));
|
||||
var member_el = $(this).parent().parent();
|
||||
|
||||
if (available) {
|
||||
|
@ -284,7 +284,7 @@ horizon.membership = {
|
|||
* displays a message to the user.
|
||||
**/
|
||||
detect_no_results: function (step_slug) {
|
||||
$('.' + step_slug + '_filterable').each( function () {
|
||||
$('.' + step_slug + '_filterable').each( function () {
|
||||
var css_class = $(this).find('ul').attr('class');
|
||||
// Example value: members step_slug_members
|
||||
// Pick the class name that contains the step_slug
|
||||
|
@ -350,8 +350,8 @@ horizon.membership = {
|
|||
$("input.filter").val("");
|
||||
|
||||
// fix styling
|
||||
$("." + step_slug + "_members .btn-group").removeClass('last_stripe');
|
||||
$("." + step_slug + "_members .btn-group:last").addClass('last_stripe');
|
||||
$("." + step_slug + "_members .btn-group").removeClass('last_stripe');
|
||||
$("." + step_slug + "_members .btn-group:last").addClass('last_stripe');
|
||||
});
|
||||
},
|
||||
|
||||
|
@ -455,7 +455,7 @@ horizon.membership = {
|
|||
|
||||
|
||||
// initially hide role dropdowns for available member list
|
||||
$form.find(".available_" + step_slug + " .role_options").hide();
|
||||
$form.find(".available_" + step_slug + " .role_options").hide();
|
||||
|
||||
// hide the dropdown for members too if we don't need to show it
|
||||
if (!horizon.membership.has_roles[step_slug]) {
|
||||
|
|
|
@ -348,14 +348,14 @@ horizon.network_topology = {
|
|||
if (d.source.data.networks.length === 0) {
|
||||
return dist + 20;
|
||||
} else if (d.target.data.instances) {
|
||||
return dist * d.source.data.networks.length + (10 * d.target.data.instances) + 20;
|
||||
return dist * d.source.data.networks.length + (10 * d.target.data.instances) + 20;
|
||||
}
|
||||
return dist * d.source.data.networks.length + 20;
|
||||
} else if (d.target.data.networks) {
|
||||
if (d.target.data.networks.length === 0) {
|
||||
return dist + 20;
|
||||
} else if (d.source.data.instances) {
|
||||
return dist * d.target.data.networks.length + (10 * d.source.data.instances) + 20;
|
||||
return dist * d.target.data.networks.length + (10 * d.source.data.instances) + 20;
|
||||
}
|
||||
return dist * d.source.data.networks.length + 20;
|
||||
}
|
||||
|
|
|
@ -251,7 +251,7 @@
|
|||
function cleanNullProperties(finalSpec) {
|
||||
// Initially clean fields that don't have any value.
|
||||
for (var key in finalSpec) {
|
||||
if (finalSpec.hasOwnProperty(key) && finalSpec[key] === null) {
|
||||
if (finalSpec.hasOwnProperty(key) && finalSpec[key] === null) {
|
||||
delete finalSpec[key];
|
||||
}
|
||||
}
|
||||
|
@ -414,7 +414,7 @@
|
|||
SOURCE_TYPE_VOLUME_SNAPSHOT,
|
||||
gettext('Volume Snapshot')
|
||||
);
|
||||
volumePromises.push(cinderAPI.getVolumes({ status: 'available', bootable: 1 })
|
||||
volumePromises.push(cinderAPI.getVolumes({ status: 'available', bootable: 1 })
|
||||
.then(onGetVolumes));
|
||||
volumePromises.push(cinderAPI.getVolumeSnapshots({ status: 'available' })
|
||||
.then(onGetVolumeSnapshots));
|
||||
|
|
|
@ -375,7 +375,7 @@
|
|||
}
|
||||
|
||||
function updateTableHeadCells(key) {
|
||||
refillArray(ctrl.tableHeadCells, tableHeadCellsMap[key]);
|
||||
refillArray(ctrl.tableHeadCells, tableHeadCellsMap[key]);
|
||||
}
|
||||
|
||||
function updateTableBodyCells(key) {
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
.module('horizon.app.core.cloud-services')
|
||||
.directive('hzIfCinderExtensions', hzCinderExtensions);
|
||||
|
||||
hzCinderExtensions.$inject = [
|
||||
hzCinderExtensions.$inject = [
|
||||
'hzPromiseToggleTemplateDirective',
|
||||
'horizon.app.core.openstack-service-api.cinderExtensions'
|
||||
];
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
.module('horizon.app.core.cloud-services')
|
||||
.directive('hzIfNovaExtensions', hzNovaExtensions);
|
||||
|
||||
hzNovaExtensions.$inject = [
|
||||
hzNovaExtensions.$inject = [
|
||||
'hzPromiseToggleTemplateDirective',
|
||||
'horizon.app.core.openstack-service-api.novaExtensions'
|
||||
];
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
.module('horizon.app.core.cloud-services')
|
||||
.directive('hzIfPolicies', hzIfPolicies);
|
||||
|
||||
hzIfPolicies.$inject = [
|
||||
hzIfPolicies.$inject = [
|
||||
'hzPromiseToggleTemplateDirective',
|
||||
'horizon.app.core.openstack-service-api.policy'
|
||||
];
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
.module('horizon.app.core.cloud-services')
|
||||
.directive('hzIfServices', hzIfServices);
|
||||
|
||||
hzIfServices.$inject = [
|
||||
hzIfServices.$inject = [
|
||||
'hzPromiseToggleTemplateDirective',
|
||||
'horizon.app.core.openstack-service-api.serviceCatalog'
|
||||
];
|
||||
|
|
Loading…
Reference in New Issue