Browse Source

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
changes/78/446178/1
Doug Fish 6 years ago
parent
commit
f3a7b9ea01
  1. 7
      .eslintrc
  2. 3
      neutron_lbaas_dashboard/static/dashboard/project/lbaasv2/loadbalancers/actions/batch-actions.service.spec.js
  3. 6
      neutron_lbaas_dashboard/static/dashboard/project/lbaasv2/loadbalancers/actions/create/wizard.controller.js
  4. 3
      neutron_lbaas_dashboard/static/dashboard/project/lbaasv2/loadbalancers/detail.controller.spec.js
  5. 5
      neutron_lbaas_dashboard/static/dashboard/project/lbaasv2/loadbalancers/table.controller.spec.js
  6. 6
      package.json

7
.eslintrc

@ -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

3
neutron_lbaas_dashboard/static/dashboard/project/lbaasv2/loadbalancers/actions/batch-actions.service.spec.js

@ -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');
}));

6
neutron_lbaas_dashboard/static/dashboard/project/lbaasv2/loadbalancers/actions/create/wizard.controller.js

@ -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
}
})();

3
neutron_lbaas_dashboard/static/dashboard/project/lbaasv2/loadbalancers/detail.controller.spec.js

@ -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);
}));

5
neutron_lbaas_dashboard/static/dashboard/project/lbaasv2/loadbalancers/table.controller.spec.js

@ -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);

6
package.json

@ -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",

Loading…
Cancel
Save