ESLint glob pattern not matching files for lint

The file glob pattern in package.json

*/static openstack_dashboard/dashboards/*/static

has been changed to openstack_dashboard/static and
horizon/static as only then does it run lint on the
openstack_dashboard folder.

Fixed issues in files in openstack_dashboard that
have unaddressed warnings.

Change-Id: I1ae1346281f028821afae159d471e3e87b2d8d6d
Closes-Bug: #1490704
This commit is contained in:
Rajat Vig
2015-08-31 12:52:10 -07:00
parent 3e6c43f7b7
commit 40899b8481
5 changed files with 10 additions and 6 deletions

View File

@@ -16,12 +16,12 @@
(function () { (function () {
'use strict'; 'use strict';
describe('horizon.app.core.metadata.modal', function () { describe('horizon.app.core.metadata.modal', function() {
describe('service.modalservice', function(){ describe('service.modalservice', function() {
var modalService, metadataService, $modal; var modalService, metadataService, $modal;
beforeEach(module('ui.bootstrap', function($provide){ beforeEach(module('ui.bootstrap', function($provide) {
$modal = jasmine.createSpyObj('$modal', ['open']); $modal = jasmine.createSpyObj('$modal', ['open']);
$provide.value('$modal', $modal); $provide.value('$modal', $modal);
@@ -31,7 +31,7 @@
$provide.constant('horizon.app.core.basePath', '/a/sample/path/'); $provide.constant('horizon.app.core.basePath', '/a/sample/path/');
})); }));
beforeEach(module('horizon.app.core.metadata', function($provide){ beforeEach(module('horizon.app.core.metadata', function($provide) {
metadataService = jasmine.createSpyObj('metadataService', ['getMetadata', 'getNamespaces']); metadataService = jasmine.createSpyObj('metadataService', ['getMetadata', 'getNamespaces']);
$provide.value('horizon.app.core.metadata.service', metadataService); $provide.value('horizon.app.core.metadata.service', metadataService);
})); }));

View File

@@ -329,7 +329,7 @@
return apiService.get('/api/nova/aggregates/' + id + '/extra-specs/') return apiService.get('/api/nova/aggregates/' + id + '/extra-specs/')
.error(function () { .error(function () {
toastService.add('error', gettext('Unable to retrieve the aggregate extra specs.')); toastService.add('error', gettext('Unable to retrieve the aggregate extra specs.'));
}); });
} }
/** /**

View File

@@ -18,6 +18,7 @@
var forEach = angular.forEach; var forEach = angular.forEach;
/* eslint-disable max-len */
/** /**
* @ngdoc factory * @ngdoc factory
* @name horizon.app.core.workflow.factory:horizon.app.core.workflow.decorator * @name horizon.app.core.workflow.factory:horizon.app.core.workflow.decorator
@@ -43,6 +44,7 @@
* | {@link horizon.app.core.workflow.factory:horizon.app.core.workflow.decorator `horizon.app.core.workflow.decorator`} | * | {@link horizon.app.core.workflow.factory:horizon.app.core.workflow.decorator `horizon.app.core.workflow.decorator`} |
* *
*/ */
/* eslint-ensable max-len */
angular angular
.module('horizon.app.core.workflow') .module('horizon.app.core.workflow')
.factory('horizon.app.core.workflow.decorator', dashboardWorkflowDecorator); .factory('horizon.app.core.workflow.decorator', dashboardWorkflowDecorator);

View File

@@ -16,6 +16,7 @@
(function () { (function () {
'use strict'; 'use strict';
/* eslint-disable max-len */
/** /**
* @ngdoc overview * @ngdoc overview
* @name horizon.app.core.workflow * @name horizon.app.core.workflow
@@ -31,6 +32,7 @@
* | {@link horizon.app.core.workflow.factory:dashboardWorkflowDecorator `dashboardWorkflowDecorator`} | * | {@link horizon.app.core.workflow.factory:dashboardWorkflowDecorator `dashboardWorkflowDecorator`} |
* *
*/ */
/* eslint-enable max-len */
angular.module('horizon.app.core.workflow', []); angular.module('horizon.app.core.workflow', []);
})(); })();

View File

@@ -23,7 +23,7 @@
"scripts": { "scripts": {
"postinstall": "if [ ! -d .venv ]; then tox -epy27 --notest; fi", "postinstall": "if [ ! -d .venv ]; then tox -epy27 --notest; fi",
"test": "karma start horizon/karma.conf.js --single-run && karma start openstack_dashboard/karma.conf.js --single-run", "test": "karma start horizon/karma.conf.js --single-run && karma start openstack_dashboard/karma.conf.js --single-run",
"lint": "eslint --no-color */static openstack_dashboard/dashboards/*/static" "lint": "eslint --no-color openstack_dashboard/static horizon/static openstack_dashboard/dashboards/*/static"
}, },
"dependencies": {} "dependencies": {}
} }