Update npm dependencies

Karma and eslint won't run because dependencies in package.json are out of date

Update package.json. Update .eslintrc to reflect renamed rules. Correct overlooked
issues in code.

Closes-Bug: #1538264
Change-Id: Ia0231f44b36cf5263ed5efbbdfa42ad9cf63c4a0
This commit is contained in:
Doug Fish 2016-01-26 19:03:44 +00:00
parent 3b72651253
commit f3a7b9ea01
6 changed files with 11 additions and 19 deletions
.eslintrc
neutron_lbaas_dashboard/static/dashboard/project/lbaasv2/loadbalancers
package.json

View File

@ -29,11 +29,8 @@ rules:
# Disabled Rules from eslint-config-openstack
#############################################################################
valid-jsdoc: 1
no-undefined: 1
brace-style: 1
strict: 1
no-extra-parens: 1
eqeqeq: 1
consistent-return: 1
callback-return: 1
guard-for-in: 1
@ -46,10 +43,10 @@ rules:
# Angular Plugin Customization
#############################################################################
angular/ng_controller_as_vm:
angular/controller-as-vm:
- 1
- "ctrl"
# Remove after migrating to angular 1.4 or later.
angular/ng_no_cookiestore:
angular/no-cookiestore:
- 1

View File

@ -17,7 +17,7 @@
'use strict';
describe('LBaaS v2 Load Balancers Table Batch Actions Service', function() {
var batchActionsService, scope;
var batchActionsService;
beforeEach(module('horizon.framework.util'));
beforeEach(module('horizon.framework.conf'));
@ -30,7 +30,6 @@
}));
beforeEach(inject(function ($injector) {
scope = $injector.get('$rootScope').$new();
batchActionsService = $injector.get(
'horizon.dashboard.project.lbaasv2.loadbalancers.actions.batchActions');
}));

View File

@ -33,10 +33,10 @@
) {
// Note: we set these attributes on the $scope so that the scope inheritance used all
// through the wizard continues to work.
$scope.workflow = createLoadBalancerWorkflow; // eslint-disable-line angular/ng_controller_as
$scope.model = createLoadBalancerModel; // eslint-disable-line angular/ng_controller_as
$scope.workflow = createLoadBalancerWorkflow; // eslint-disable-line angular/controller-as
$scope.model = createLoadBalancerModel; // eslint-disable-line angular/controller-as
$scope.model.initialize();
$scope.submit = $scope.model.createLoadBalancer; // eslint-disable-line angular/ng_controller_as
$scope.submit = $scope.model.createLoadBalancer; // eslint-disable-line angular/controller-as
}
})();

View File

@ -17,7 +17,7 @@
'use strict';
describe('LBaaS v2 Load Balancer Detail Controller', function() {
var controller, lbaasv2API, staticUrl, loadbalancer;
var controller, lbaasv2API, loadbalancer;
function fakeAPI() {
return {
@ -39,7 +39,6 @@
loadbalancer = { id: '1234' };
lbaasv2API = $injector.get('horizon.app.core.openstack-service-api.lbaasv2');
controller = $injector.get('$controller');
staticUrl = $injector.get('$window').STATIC_URL;
spyOn(lbaasv2API, 'getLoadBalancer').and.callFake(fakeAPI);
}));

View File

@ -17,7 +17,7 @@
'use strict';
describe('LBaaS v2 Load Balancers Table Controller', function() {
var controller, lbaasv2API, staticUrl, scope, batchActionsService;
var controller, lbaasv2API, scope;
var items = [];
function fakeAPI() {
@ -42,10 +42,7 @@
beforeEach(inject(function($injector) {
lbaasv2API = $injector.get('horizon.app.core.openstack-service-api.lbaasv2');
batchActionsService = $injector.get(
'horizon.dashboard.project.lbaasv2.loadbalancers.actions.batchActions');
controller = $injector.get('$controller');
staticUrl = $injector.get('$window').STATIC_URL;
scope = $injector.get('$rootScope').$new();
scope.lbaasv2API = lbaasv2API;
spyOn(lbaasv2API, 'getLoadBalancers').and.callFake(fakeAPI);

View File

@ -6,9 +6,9 @@
"repository": "none",
"license": "Apache 2.0",
"devDependencies": {
"eslint": "1.2.0",
"eslint-config-openstack": "1.2.2",
"eslint-plugin-angular": "0.4.0",
"eslint": "1.2.1",
"eslint-config-openstack": "1.2.3",
"eslint-plugin-angular": "0.15.0",
"jasmine-core": "2.2.0",
"karma": "0.12.31",
"karma-chrome-launcher": "0.1.8",