From f3a7b9ea01923e5760b8ac38bdea527b2254e5b3 Mon Sep 17 00:00:00 2001 From: Doug Fish Date: Tue, 26 Jan 2016 19:03:44 +0000 Subject: [PATCH] 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 --- .eslintrc | 7 ++----- .../loadbalancers/actions/batch-actions.service.spec.js | 3 +-- .../loadbalancers/actions/create/wizard.controller.js | 6 +++--- .../lbaasv2/loadbalancers/detail.controller.spec.js | 3 +-- .../project/lbaasv2/loadbalancers/table.controller.spec.js | 5 +---- package.json | 6 +++--- 6 files changed, 11 insertions(+), 19 deletions(-) diff --git a/.eslintrc b/.eslintrc index feee5de0..4f130aab 100644 --- a/.eslintrc +++ b/.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 diff --git a/neutron_lbaas_dashboard/static/dashboard/project/lbaasv2/loadbalancers/actions/batch-actions.service.spec.js b/neutron_lbaas_dashboard/static/dashboard/project/lbaasv2/loadbalancers/actions/batch-actions.service.spec.js index 488a7aaf..25a7dfcf 100644 --- a/neutron_lbaas_dashboard/static/dashboard/project/lbaasv2/loadbalancers/actions/batch-actions.service.spec.js +++ b/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'); })); diff --git a/neutron_lbaas_dashboard/static/dashboard/project/lbaasv2/loadbalancers/actions/create/wizard.controller.js b/neutron_lbaas_dashboard/static/dashboard/project/lbaasv2/loadbalancers/actions/create/wizard.controller.js index f7386b36..7318dff6 100644 --- a/neutron_lbaas_dashboard/static/dashboard/project/lbaasv2/loadbalancers/actions/create/wizard.controller.js +++ b/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 } })(); diff --git a/neutron_lbaas_dashboard/static/dashboard/project/lbaasv2/loadbalancers/detail.controller.spec.js b/neutron_lbaas_dashboard/static/dashboard/project/lbaasv2/loadbalancers/detail.controller.spec.js index d3676191..aeed16f2 100644 --- a/neutron_lbaas_dashboard/static/dashboard/project/lbaasv2/loadbalancers/detail.controller.spec.js +++ b/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); })); diff --git a/neutron_lbaas_dashboard/static/dashboard/project/lbaasv2/loadbalancers/table.controller.spec.js b/neutron_lbaas_dashboard/static/dashboard/project/lbaasv2/loadbalancers/table.controller.spec.js index d80e5d62..bc5e3dac 100644 --- a/neutron_lbaas_dashboard/static/dashboard/project/lbaasv2/loadbalancers/table.controller.spec.js +++ b/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); diff --git a/package.json b/package.json index 267f1e39..1bf0b72b 100644 --- a/package.json +++ b/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",