tech: removing unused variables from typescript files, and making tslint rules more strict

This commit is contained in:
Torkel Ödegaard
2017-09-21 16:40:18 +02:00
parent adda84d124
commit b8d9722b4f
176 changed files with 137 additions and 391 deletions

View File

@@ -1,9 +1,7 @@
///<reference path="../../headers/common.d.ts" />
import angular from 'angular';
import _ from 'lodash';
import coreModule from '../../core/core_module';
import config from 'app/core/config';
export class PlaylistEditCtrl {
filteredDashboards: any = [];
@@ -21,11 +19,10 @@ export class PlaylistEditCtrl {
/** @ngInject */
constructor(
private $scope,
private playlistSrv,
private backendSrv,
private $location,
private $route,
private navModelSrv
$route,
navModelSrv
) {
this.navModel = navModelSrv.getPlaylistsNav(0);

View File

@@ -1,9 +1,5 @@
///<reference path="../../headers/common.d.ts" />
import angular from 'angular';
import config from 'app/core/config';
import _ from 'lodash';
import $ from 'jquery';
import coreModule from '../../core/core_module';
export class PlaylistSearchCtrl {
@@ -13,7 +9,7 @@ export class PlaylistSearchCtrl {
searchStarted: any;
/** @ngInject */
constructor(private $scope, private $location, private $timeout, private backendSrv, private contextSrv) {
constructor($timeout, private backendSrv) {
this.query = {query: '', tag: [], starred: false, limit: 30};
$timeout(() => {

View File

@@ -1,6 +1,5 @@
///<reference path="../../headers/common.d.ts" />
import angular from 'angular';
import coreModule from '../../core/core_module';
import kbn from 'app/core/utils/kbn';
import appEvents from 'app/core/app_events';
@@ -16,7 +15,6 @@ class PlaylistSrv {
/** @ngInject */
constructor(
private $rootScope: any,
private $location: any,
private $timeout: any,
private backendSrv: any,

View File

@@ -1,6 +1,5 @@
///<reference path="../../headers/common.d.ts" />
import angular from 'angular';
import _ from 'lodash';
import coreModule from '../../core/core_module';
@@ -9,7 +8,7 @@ export class PlaylistsCtrl {
navModel: any;
/** @ngInject */
constructor(private $scope, private $location, private backendSrv, private navModelSrv) {
constructor(private $scope, private backendSrv, navModelSrv) {
this.navModel = navModelSrv.getPlaylistsNav(0);
backendSrv.get('/api/playlists').then(result => {

View File

@@ -9,7 +9,7 @@ describe('PlaylistEditCtrl', () => {
getPlaylistsNav: page => {},
};
ctx = new PlaylistEditCtrl(null, null, null, null, { current: { params: {} } }, navModelSrv);
ctx = new PlaylistEditCtrl(null, null, null, { current: { params: {} } }, navModelSrv);
ctx.dashboardresult = [
{ id: 2, title: 'dashboard: 2' },