From abbb6f933c3e2eca02ca7b2b5b39a36cd437316a Mon Sep 17 00:00:00 2001 From: Patrick O'Carroll Date: Fri, 31 Aug 2018 16:40:43 +0200 Subject: [PATCH] added jsdoc-format rule and fixed files that didn't follow new rule (#13107) --- public/app/core/components/form_dropdown/form_dropdown.ts | 2 +- .../app/core/components/layout_selector/layout_selector.ts | 6 +++--- public/app/core/directives/rebuild_on_change.ts | 2 +- public/app/core/services/popover_srv.ts | 2 +- public/app/features/admin/admin.ts | 4 ++-- public/app/features/annotations/annotation_tooltip.ts | 2 +- public/app/features/annotations/event_editor.ts | 2 +- public/app/features/dashboard/create_folder_ctrl.ts | 2 +- .../app/features/dashboard/repeat_option/repeat_option.ts | 2 +- public/app/features/dashboard/share_snapshot_ctrl.ts | 2 +- public/app/features/dashboard/time_srv.ts | 2 +- public/app/features/org/change_password_ctrl.ts | 2 +- public/app/features/org/create_team_ctrl.ts | 2 +- public/app/features/org/new_org_ctrl.ts | 2 +- public/app/features/org/org_api_keys_ctrl.ts | 2 +- public/app/features/org/org_details_ctrl.ts | 2 +- public/app/features/org/prefs_control.ts | 2 +- public/app/features/org/profile_ctrl.ts | 2 +- public/app/features/org/select_org_ctrl.ts | 2 +- public/app/features/org/user_invite_ctrl.ts | 2 +- public/app/features/panel/metrics_tab.ts | 2 +- public/app/features/panel/panel_header.ts | 2 +- public/app/features/panel/query_editor_row.ts | 2 +- public/app/features/panel/query_troubleshooter.ts | 2 +- public/app/features/plugins/plugin_component.ts | 2 +- public/app/features/styleguide/styleguide.ts | 2 +- public/app/features/templating/adhoc_variable.ts | 2 +- public/app/features/templating/constant_variable.ts | 2 +- public/app/features/templating/custom_variable.ts | 2 +- public/app/features/templating/datasource_variable.ts | 2 +- public/app/features/templating/editor_ctrl.ts | 2 +- public/app/features/templating/interval_variable.ts | 2 +- public/app/features/templating/query_variable.ts | 2 +- public/app/plugins/datasource/cloudwatch/query_ctrl.ts | 2 +- public/app/plugins/datasource/elasticsearch/query_ctrl.ts | 2 +- public/app/plugins/datasource/graphite/query_ctrl.ts | 2 +- public/app/plugins/datasource/influxdb/query_ctrl.ts | 2 +- public/app/plugins/datasource/mssql/datasource.ts | 2 +- public/app/plugins/datasource/mssql/module.ts | 2 +- public/app/plugins/datasource/mssql/query_ctrl.ts | 2 +- public/app/plugins/datasource/mysql/datasource.ts | 2 +- public/app/plugins/datasource/mysql/module.ts | 2 +- public/app/plugins/datasource/mysql/query_ctrl.ts | 2 +- public/app/plugins/datasource/opentsdb/query_ctrl.ts | 2 +- public/app/plugins/datasource/postgres/datasource.ts | 2 +- public/app/plugins/datasource/postgres/module.ts | 4 ++-- public/app/plugins/datasource/postgres/query_ctrl.ts | 2 +- public/app/plugins/datasource/testdata/query_ctrl.ts | 2 +- public/app/plugins/panel/gettingstarted/module.ts | 2 +- public/app/plugins/panel/graph/axes_editor.ts | 4 ++-- public/app/plugins/panel/graph/graph.ts | 2 +- public/app/plugins/panel/text/module.ts | 2 +- public/app/routes/routes.ts | 2 +- tslint.json | 1 + 54 files changed, 59 insertions(+), 58 deletions(-) diff --git a/public/app/core/components/form_dropdown/form_dropdown.ts b/public/app/core/components/form_dropdown/form_dropdown.ts index 8f374c225ea..6e863e1cb5d 100644 --- a/public/app/core/components/form_dropdown/form_dropdown.ts +++ b/public/app/core/components/form_dropdown/form_dropdown.ts @@ -36,7 +36,7 @@ export class FormDropdownCtrl { startOpen: any; debounce: number; - /** @ngInject **/ + /** @ngInject */ constructor(private $scope, $element, private $sce, private templateSrv, private $q) { this.inputElement = $element.find('input').first(); this.linkElement = $element.find('a').first(); diff --git a/public/app/core/components/layout_selector/layout_selector.ts b/public/app/core/components/layout_selector/layout_selector.ts index 07f1c8628e9..6fcc768c846 100644 --- a/public/app/core/components/layout_selector/layout_selector.ts +++ b/public/app/core/components/layout_selector/layout_selector.ts @@ -15,7 +15,7 @@ const template = ` export class LayoutSelectorCtrl { mode: string; - /** @ngInject **/ + /** @ngInject */ constructor(private $rootScope) { this.mode = store.get('grafana.list.layout.mode') || 'grid'; } @@ -33,7 +33,7 @@ export class LayoutSelectorCtrl { } } -/** @ngInject **/ +/** @ngInject */ export function layoutSelector() { return { restrict: 'E', @@ -45,7 +45,7 @@ export function layoutSelector() { }; } -/** @ngInject **/ +/** @ngInject */ export function layoutMode($rootScope) { return { restrict: 'A', diff --git a/public/app/core/directives/rebuild_on_change.ts b/public/app/core/directives/rebuild_on_change.ts index edb7c48b482..72b9c05064a 100644 --- a/public/app/core/directives/rebuild_on_change.ts +++ b/public/app/core/directives/rebuild_on_change.ts @@ -18,7 +18,7 @@ function getBlockNodes(nodes) { return blockNodes || nodes; } -/** @ngInject **/ +/** @ngInject */ function rebuildOnChange($animate) { return { multiElement: true, diff --git a/public/app/core/services/popover_srv.ts b/public/app/core/services/popover_srv.ts index 5072d04fa9f..631cc274021 100644 --- a/public/app/core/services/popover_srv.ts +++ b/public/app/core/services/popover_srv.ts @@ -2,7 +2,7 @@ import _ from 'lodash'; import coreModule from 'app/core/core_module'; import Drop from 'tether-drop'; -/** @ngInject **/ +/** @ngInject */ function popoverSrv(this: any, $compile, $rootScope, $timeout) { let openDrop = null; diff --git a/public/app/features/admin/admin.ts b/public/app/features/admin/admin.ts index bdbb887817e..383b50b5d25 100644 --- a/public/app/features/admin/admin.ts +++ b/public/app/features/admin/admin.ts @@ -8,7 +8,7 @@ import coreModule from 'app/core/core_module'; class AdminSettingsCtrl { navModel: any; - /** @ngInject **/ + /** @ngInject */ constructor($scope, backendSrv, navModelSrv) { this.navModel = navModelSrv.getNav('cfg', 'admin', 'server-settings', 1); @@ -21,7 +21,7 @@ class AdminSettingsCtrl { class AdminHomeCtrl { navModel: any; - /** @ngInject **/ + /** @ngInject */ constructor(navModelSrv) { this.navModel = navModelSrv.getNav('cfg', 'admin', 1); } diff --git a/public/app/features/annotations/annotation_tooltip.ts b/public/app/features/annotations/annotation_tooltip.ts index 9d1147aba60..6da6fc4f66d 100644 --- a/public/app/features/annotations/annotation_tooltip.ts +++ b/public/app/features/annotations/annotation_tooltip.ts @@ -3,7 +3,7 @@ import $ from 'jquery'; import coreModule from 'app/core/core_module'; import alertDef from '../alerting/alert_def'; -/** @ngInject **/ +/** @ngInject */ export function annotationTooltipDirective($sanitize, dashboardSrv, contextSrv, $compile) { function sanitizeString(str) { try { diff --git a/public/app/features/annotations/event_editor.ts b/public/app/features/annotations/event_editor.ts index 90c425438ab..a88cc44a251 100644 --- a/public/app/features/annotations/event_editor.ts +++ b/public/app/features/annotations/event_editor.ts @@ -12,7 +12,7 @@ export class EventEditorCtrl { close: any; timeFormated: string; - /** @ngInject **/ + /** @ngInject */ constructor(private annotationsSrv) { this.event.panelId = this.panelCtrl.panel.id; this.event.dashboardId = this.panelCtrl.dashboard.id; diff --git a/public/app/features/dashboard/create_folder_ctrl.ts b/public/app/features/dashboard/create_folder_ctrl.ts index 5c8bd276f76..99b2e8d4853 100644 --- a/public/app/features/dashboard/create_folder_ctrl.ts +++ b/public/app/features/dashboard/create_folder_ctrl.ts @@ -8,7 +8,7 @@ export class CreateFolderCtrl { hasValidationError: boolean; validationError: any; - /** @ngInject **/ + /** @ngInject */ constructor(private backendSrv, private $location, private validationSrv, navModelSrv) { this.navModel = navModelSrv.getNav('dashboards', 'manage-dashboards', 0); } diff --git a/public/app/features/dashboard/repeat_option/repeat_option.ts b/public/app/features/dashboard/repeat_option/repeat_option.ts index 01e1d716fc5..19c28607640 100644 --- a/public/app/features/dashboard/repeat_option/repeat_option.ts +++ b/public/app/features/dashboard/repeat_option/repeat_option.ts @@ -7,7 +7,7 @@ const template = ` `; -/** @ngInject **/ +/** @ngInject */ function dashRepeatOptionDirective(variableSrv) { return { restrict: 'E', diff --git a/public/app/features/dashboard/share_snapshot_ctrl.ts b/public/app/features/dashboard/share_snapshot_ctrl.ts index c470ddb47dd..2cda493838a 100644 --- a/public/app/features/dashboard/share_snapshot_ctrl.ts +++ b/public/app/features/dashboard/share_snapshot_ctrl.ts @@ -2,7 +2,7 @@ import angular from 'angular'; import _ from 'lodash'; export class ShareSnapshotCtrl { - /** @ngInject **/ + /** @ngInject */ constructor($scope, $rootScope, $location, backendSrv, $timeout, timeSrv) { $scope.snapshot = { name: $scope.dashboard.title, diff --git a/public/app/features/dashboard/time_srv.ts b/public/app/features/dashboard/time_srv.ts index 9435433848e..4bd78ce776d 100644 --- a/public/app/features/dashboard/time_srv.ts +++ b/public/app/features/dashboard/time_srv.ts @@ -13,7 +13,7 @@ export class TimeSrv { timeAtLoad: any; private autoRefreshBlocked: boolean; - /** @ngInject **/ + /** @ngInject */ constructor(private $rootScope, private $timeout, private $location, private timer, private contextSrv) { // default time this.time = { from: '6h', to: 'now' }; diff --git a/public/app/features/org/change_password_ctrl.ts b/public/app/features/org/change_password_ctrl.ts index b84cbecfea7..033ff807721 100644 --- a/public/app/features/org/change_password_ctrl.ts +++ b/public/app/features/org/change_password_ctrl.ts @@ -2,7 +2,7 @@ import angular from 'angular'; import config from 'app/core/config'; export class ChangePasswordCtrl { - /** @ngInject **/ + /** @ngInject */ constructor($scope, backendSrv, $location, navModelSrv) { $scope.command = {}; $scope.authProxyEnabled = config.authProxyEnabled; diff --git a/public/app/features/org/create_team_ctrl.ts b/public/app/features/org/create_team_ctrl.ts index 241e96968a0..d016d85afc0 100644 --- a/public/app/features/org/create_team_ctrl.ts +++ b/public/app/features/org/create_team_ctrl.ts @@ -5,7 +5,7 @@ export default class CreateTeamCtrl { email: string; navModel: any; - /** @ngInject **/ + /** @ngInject */ constructor(private backendSrv, private $location, navModelSrv) { this.navModel = navModelSrv.getNav('cfg', 'teams', 0); } diff --git a/public/app/features/org/new_org_ctrl.ts b/public/app/features/org/new_org_ctrl.ts index 91b16adc113..bc87010c100 100644 --- a/public/app/features/org/new_org_ctrl.ts +++ b/public/app/features/org/new_org_ctrl.ts @@ -2,7 +2,7 @@ import angular from 'angular'; import config from 'app/core/config'; export class NewOrgCtrl { - /** @ngInject **/ + /** @ngInject */ constructor($scope, $http, backendSrv, navModelSrv) { $scope.navModel = navModelSrv.getNav('cfg', 'admin', 'global-orgs', 1); $scope.newOrg = { name: '' }; diff --git a/public/app/features/org/org_api_keys_ctrl.ts b/public/app/features/org/org_api_keys_ctrl.ts index 4ea40b900c7..668d6a86841 100644 --- a/public/app/features/org/org_api_keys_ctrl.ts +++ b/public/app/features/org/org_api_keys_ctrl.ts @@ -1,7 +1,7 @@ import angular from 'angular'; export class OrgApiKeysCtrl { - /** @ngInject **/ + /** @ngInject */ constructor($scope, $http, backendSrv, navModelSrv) { $scope.navModel = navModelSrv.getNav('cfg', 'apikeys', 0); diff --git a/public/app/features/org/org_details_ctrl.ts b/public/app/features/org/org_details_ctrl.ts index 7bc6ee1336b..2ec1b57e170 100644 --- a/public/app/features/org/org_details_ctrl.ts +++ b/public/app/features/org/org_details_ctrl.ts @@ -1,7 +1,7 @@ import angular from 'angular'; export class OrgDetailsCtrl { - /** @ngInject **/ + /** @ngInject */ constructor($scope, $http, backendSrv, contextSrv, navModelSrv) { $scope.init = function() { $scope.getOrgInfo(); diff --git a/public/app/features/org/prefs_control.ts b/public/app/features/org/prefs_control.ts index 6c6ffdf647d..74dde250eec 100644 --- a/public/app/features/org/prefs_control.ts +++ b/public/app/features/org/prefs_control.ts @@ -14,7 +14,7 @@ export class PrefsControlCtrl { ]; themes: any = [{ value: '', text: 'Default' }, { value: 'dark', text: 'Dark' }, { value: 'light', text: 'Light' }]; - /** @ngInject **/ + /** @ngInject */ constructor(private backendSrv, private $location) {} $onInit() { diff --git a/public/app/features/org/profile_ctrl.ts b/public/app/features/org/profile_ctrl.ts index 40ee4d908a1..d394fc4319a 100644 --- a/public/app/features/org/profile_ctrl.ts +++ b/public/app/features/org/profile_ctrl.ts @@ -12,7 +12,7 @@ export class ProfileCtrl { readonlyLoginFields = config.disableLoginForm; navModel: any; - /** @ngInject **/ + /** @ngInject */ constructor(private backendSrv, private contextSrv, private $location, navModelSrv) { this.getUser(); this.getUserTeams(); diff --git a/public/app/features/org/select_org_ctrl.ts b/public/app/features/org/select_org_ctrl.ts index 199d1f8ac94..34cfc9b7df4 100644 --- a/public/app/features/org/select_org_ctrl.ts +++ b/public/app/features/org/select_org_ctrl.ts @@ -2,7 +2,7 @@ import angular from 'angular'; import config from 'app/core/config'; export class SelectOrgCtrl { - /** @ngInject **/ + /** @ngInject */ constructor($scope, backendSrv, contextSrv) { contextSrv.sidemenu = false; diff --git a/public/app/features/org/user_invite_ctrl.ts b/public/app/features/org/user_invite_ctrl.ts index 36dde418b2c..9f3b641035a 100644 --- a/public/app/features/org/user_invite_ctrl.ts +++ b/public/app/features/org/user_invite_ctrl.ts @@ -5,7 +5,7 @@ export class UserInviteCtrl { invite: any; inviteForm: any; - /** @ngInject **/ + /** @ngInject */ constructor(private backendSrv, navModelSrv, private $location) { this.navModel = navModelSrv.getNav('cfg', 'users', 0); diff --git a/public/app/features/panel/metrics_tab.ts b/public/app/features/panel/metrics_tab.ts index e55190bf491..3a1d0abe1c2 100644 --- a/public/app/features/panel/metrics_tab.ts +++ b/public/app/features/panel/metrics_tab.ts @@ -110,7 +110,7 @@ export class MetricsTabCtrl { } } -/** @ngInject **/ +/** @ngInject */ export function metricsTabDirective() { 'use strict'; return { diff --git a/public/app/features/panel/panel_header.ts b/public/app/features/panel/panel_header.ts index 410be0a1890..102f065cff2 100644 --- a/public/app/features/panel/panel_header.ts +++ b/public/app/features/panel/panel_header.ts @@ -80,7 +80,7 @@ function createMenuTemplate(ctrl) { return html; } -/** @ngInject **/ +/** @ngInject */ function panelHeader($compile) { return { restrict: 'E', diff --git a/public/app/features/panel/query_editor_row.ts b/public/app/features/panel/query_editor_row.ts index 211dbcfccb2..fb4c4a5cde6 100644 --- a/public/app/features/panel/query_editor_row.ts +++ b/public/app/features/panel/query_editor_row.ts @@ -87,7 +87,7 @@ export class QueryRowCtrl { } } -/** @ngInject **/ +/** @ngInject */ function queryEditorRowDirective() { return { restrict: 'E', diff --git a/public/app/features/panel/query_troubleshooter.ts b/public/app/features/panel/query_troubleshooter.ts index d9959a05a62..e4d2eb5a302 100644 --- a/public/app/features/panel/query_troubleshooter.ts +++ b/public/app/features/panel/query_troubleshooter.ts @@ -40,7 +40,7 @@ export class QueryTroubleshooterCtrl { mockedResponse: string; jsonExplorer: JsonExplorer; - /** @ngInject **/ + /** @ngInject */ constructor($scope, private $timeout) { this.onRequestErrorEventListener = this.onRequestError.bind(this); this.onRequestResponseEventListener = this.onRequestResponse.bind(this); diff --git a/public/app/features/plugins/plugin_component.ts b/public/app/features/plugins/plugin_component.ts index 8ef20eb54d5..dc55ee2a181 100644 --- a/public/app/features/plugins/plugin_component.ts +++ b/public/app/features/plugins/plugin_component.ts @@ -7,7 +7,7 @@ import { importPluginModule } from './plugin_loader'; import { UnknownPanelCtrl } from 'app/plugins/panel/unknown/module'; -/** @ngInject **/ +/** @ngInject */ function pluginDirectiveLoader($compile, datasourceSrv, $rootScope, $q, $http, $templateCache) { function getTemplate(component) { if (component.template) { diff --git a/public/app/features/styleguide/styleguide.ts b/public/app/features/styleguide/styleguide.ts index 26f14bf9388..4aac194d950 100644 --- a/public/app/features/styleguide/styleguide.ts +++ b/public/app/features/styleguide/styleguide.ts @@ -8,7 +8,7 @@ class StyleGuideCtrl { buttonVariants = ['-']; navModel: any; - /** @ngInject **/ + /** @ngInject */ constructor(private $routeParams, private backendSrv, navModelSrv) { this.navModel = navModelSrv.getNav('cfg', 'admin', 'styleguide', 1); this.theme = config.bootData.user.lightTheme ? 'light' : 'dark'; diff --git a/public/app/features/templating/adhoc_variable.ts b/public/app/features/templating/adhoc_variable.ts index 3e5b2af8b6b..bc157bfd697 100644 --- a/public/app/features/templating/adhoc_variable.ts +++ b/public/app/features/templating/adhoc_variable.ts @@ -15,7 +15,7 @@ export class AdhocVariable implements Variable { skipUrlSync: false, }; - /** @ngInject **/ + /** @ngInject */ constructor(private model) { assignModelProperties(this, model, this.defaults); } diff --git a/public/app/features/templating/constant_variable.ts b/public/app/features/templating/constant_variable.ts index e727c6e98af..dcda31f43a3 100644 --- a/public/app/features/templating/constant_variable.ts +++ b/public/app/features/templating/constant_variable.ts @@ -17,7 +17,7 @@ export class ConstantVariable implements Variable { skipUrlSync: false, }; - /** @ngInject **/ + /** @ngInject */ constructor(private model, private variableSrv) { assignModelProperties(this, model, this.defaults); } diff --git a/public/app/features/templating/custom_variable.ts b/public/app/features/templating/custom_variable.ts index 4490a41a38f..fe383c68077 100644 --- a/public/app/features/templating/custom_variable.ts +++ b/public/app/features/templating/custom_variable.ts @@ -23,7 +23,7 @@ export class CustomVariable implements Variable { skipUrlSync: false, }; - /** @ngInject **/ + /** @ngInject */ constructor(private model, private variableSrv) { assignModelProperties(this, model, this.defaults); } diff --git a/public/app/features/templating/datasource_variable.ts b/public/app/features/templating/datasource_variable.ts index 258fa043e1d..4424720c7f8 100644 --- a/public/app/features/templating/datasource_variable.ts +++ b/public/app/features/templating/datasource_variable.ts @@ -22,7 +22,7 @@ export class DatasourceVariable implements Variable { skipUrlSync: false, }; - /** @ngInject **/ + /** @ngInject */ constructor(private model, private datasourceSrv, private variableSrv, private templateSrv) { assignModelProperties(this, model, this.defaults); this.refresh = 1; diff --git a/public/app/features/templating/editor_ctrl.ts b/public/app/features/templating/editor_ctrl.ts index 1222af7f93c..9dc6468415a 100644 --- a/public/app/features/templating/editor_ctrl.ts +++ b/public/app/features/templating/editor_ctrl.ts @@ -4,7 +4,7 @@ import { variableTypes } from './variable'; import appEvents from 'app/core/app_events'; export class VariableEditorCtrl { - /** @ngInject **/ + /** @ngInject */ constructor($scope, datasourceSrv, variableSrv, templateSrv) { $scope.variableTypes = variableTypes; $scope.ctrl = {}; diff --git a/public/app/features/templating/interval_variable.ts b/public/app/features/templating/interval_variable.ts index e6ee861f828..bb6c2a19e7f 100644 --- a/public/app/features/templating/interval_variable.ts +++ b/public/app/features/templating/interval_variable.ts @@ -28,7 +28,7 @@ export class IntervalVariable implements Variable { skipUrlSync: false, }; - /** @ngInject **/ + /** @ngInject */ constructor(private model, private timeSrv, private templateSrv, private variableSrv) { assignModelProperties(this, model, this.defaults); this.refresh = 2; diff --git a/public/app/features/templating/query_variable.ts b/public/app/features/templating/query_variable.ts index 1b8c3697fe9..e1ffcb837cb 100644 --- a/public/app/features/templating/query_variable.ts +++ b/public/app/features/templating/query_variable.ts @@ -46,7 +46,7 @@ export class QueryVariable implements Variable { skipUrlSync: false, }; - /** @ngInject **/ + /** @ngInject */ constructor(private model, private datasourceSrv, private templateSrv, private variableSrv, private timeSrv) { // copy model properties to this instance assignModelProperties(this, model, this.defaults); diff --git a/public/app/plugins/datasource/cloudwatch/query_ctrl.ts b/public/app/plugins/datasource/cloudwatch/query_ctrl.ts index 0d250935445..55b7786e302 100644 --- a/public/app/plugins/datasource/cloudwatch/query_ctrl.ts +++ b/public/app/plugins/datasource/cloudwatch/query_ctrl.ts @@ -6,7 +6,7 @@ export class CloudWatchQueryCtrl extends QueryCtrl { aliasSyntax: string; - /** @ngInject **/ + /** @ngInject */ constructor($scope, $injector) { super($scope, $injector); this.aliasSyntax = '{{metric}} {{stat}} {{namespace}} {{region}} {{}}'; diff --git a/public/app/plugins/datasource/elasticsearch/query_ctrl.ts b/public/app/plugins/datasource/elasticsearch/query_ctrl.ts index bdfdbda8215..422d35dd277 100644 --- a/public/app/plugins/datasource/elasticsearch/query_ctrl.ts +++ b/public/app/plugins/datasource/elasticsearch/query_ctrl.ts @@ -12,7 +12,7 @@ export class ElasticQueryCtrl extends QueryCtrl { esVersion: any; rawQueryOld: string; - /** @ngInject **/ + /** @ngInject */ constructor($scope, $injector, private $rootScope, private uiSegmentSrv) { super($scope, $injector); diff --git a/public/app/plugins/datasource/graphite/query_ctrl.ts b/public/app/plugins/datasource/graphite/query_ctrl.ts index 60c6b3c262a..fa908c5e955 100644 --- a/public/app/plugins/datasource/graphite/query_ctrl.ts +++ b/public/app/plugins/datasource/graphite/query_ctrl.ts @@ -19,7 +19,7 @@ export class GraphiteQueryCtrl extends QueryCtrl { supportsTags: boolean; paused: boolean; - /** @ngInject **/ + /** @ngInject */ constructor($scope, $injector, private uiSegmentSrv, private templateSrv, $timeout) { super($scope, $injector); this.supportsTags = this.datasource.supportsTags; diff --git a/public/app/plugins/datasource/influxdb/query_ctrl.ts b/public/app/plugins/datasource/influxdb/query_ctrl.ts index ae62fcc1b2a..4a9310c63d1 100644 --- a/public/app/plugins/datasource/influxdb/query_ctrl.ts +++ b/public/app/plugins/datasource/influxdb/query_ctrl.ts @@ -19,7 +19,7 @@ export class InfluxQueryCtrl extends QueryCtrl { measurementSegment: any; removeTagFilterSegment: any; - /** @ngInject **/ + /** @ngInject */ constructor($scope, $injector, private templateSrv, private $q, private uiSegmentSrv) { super($scope, $injector); this.target = this.target; diff --git a/public/app/plugins/datasource/mssql/datasource.ts b/public/app/plugins/datasource/mssql/datasource.ts index f30ea4c97fe..fc497b2c274 100644 --- a/public/app/plugins/datasource/mssql/datasource.ts +++ b/public/app/plugins/datasource/mssql/datasource.ts @@ -6,7 +6,7 @@ export class MssqlDatasource { name: any; responseParser: ResponseParser; - /** @ngInject **/ + /** @ngInject */ constructor(instanceSettings, private backendSrv, private $q, private templateSrv) { this.name = instanceSettings.name; this.id = instanceSettings.id; diff --git a/public/app/plugins/datasource/mssql/module.ts b/public/app/plugins/datasource/mssql/module.ts index a2e1e923bc6..478ecadcb3e 100644 --- a/public/app/plugins/datasource/mssql/module.ts +++ b/public/app/plugins/datasource/mssql/module.ts @@ -21,7 +21,7 @@ class MssqlAnnotationsQueryCtrl { annotation: any; - /** @ngInject **/ + /** @ngInject */ constructor() { this.annotation.rawQuery = this.annotation.rawQuery || defaultQuery; } diff --git a/public/app/plugins/datasource/mssql/query_ctrl.ts b/public/app/plugins/datasource/mssql/query_ctrl.ts index 1b64a571c6c..7598ca292fe 100644 --- a/public/app/plugins/datasource/mssql/query_ctrl.ts +++ b/public/app/plugins/datasource/mssql/query_ctrl.ts @@ -33,7 +33,7 @@ export class MssqlQueryCtrl extends QueryCtrl { lastQueryError: string; showHelp: boolean; - /** @ngInject **/ + /** @ngInject */ constructor($scope, $injector) { super($scope, $injector); diff --git a/public/app/plugins/datasource/mysql/datasource.ts b/public/app/plugins/datasource/mysql/datasource.ts index e41417e155c..eca223f2d6d 100644 --- a/public/app/plugins/datasource/mysql/datasource.ts +++ b/public/app/plugins/datasource/mysql/datasource.ts @@ -6,7 +6,7 @@ export class MysqlDatasource { name: any; responseParser: ResponseParser; - /** @ngInject **/ + /** @ngInject */ constructor(instanceSettings, private backendSrv, private $q, private templateSrv) { this.name = instanceSettings.name; this.id = instanceSettings.id; diff --git a/public/app/plugins/datasource/mysql/module.ts b/public/app/plugins/datasource/mysql/module.ts index bb5b5bd9056..2d8caf17af4 100644 --- a/public/app/plugins/datasource/mysql/module.ts +++ b/public/app/plugins/datasource/mysql/module.ts @@ -20,7 +20,7 @@ class MysqlAnnotationsQueryCtrl { annotation: any; - /** @ngInject **/ + /** @ngInject */ constructor() { this.annotation.rawQuery = this.annotation.rawQuery || defaultQuery; } diff --git a/public/app/plugins/datasource/mysql/query_ctrl.ts b/public/app/plugins/datasource/mysql/query_ctrl.ts index 1de1fb768ad..ced4d6e8b13 100644 --- a/public/app/plugins/datasource/mysql/query_ctrl.ts +++ b/public/app/plugins/datasource/mysql/query_ctrl.ts @@ -31,7 +31,7 @@ export class MysqlQueryCtrl extends QueryCtrl { lastQueryError: string; showHelp: boolean; - /** @ngInject **/ + /** @ngInject */ constructor($scope, $injector) { super($scope, $injector); diff --git a/public/app/plugins/datasource/opentsdb/query_ctrl.ts b/public/app/plugins/datasource/opentsdb/query_ctrl.ts index e00a01ebd9f..4c8a0ed8d12 100644 --- a/public/app/plugins/datasource/opentsdb/query_ctrl.ts +++ b/public/app/plugins/datasource/opentsdb/query_ctrl.ts @@ -19,7 +19,7 @@ export class OpenTsQueryCtrl extends QueryCtrl { addTagMode: boolean; addFilterMode: boolean; - /** @ngInject **/ + /** @ngInject */ constructor($scope, $injector) { super($scope, $injector); diff --git a/public/app/plugins/datasource/postgres/datasource.ts b/public/app/plugins/datasource/postgres/datasource.ts index 02aa947fd1c..678327a4a86 100644 --- a/public/app/plugins/datasource/postgres/datasource.ts +++ b/public/app/plugins/datasource/postgres/datasource.ts @@ -6,7 +6,7 @@ export class PostgresDatasource { name: any; responseParser: ResponseParser; - /** @ngInject **/ + /** @ngInject */ constructor(instanceSettings, private backendSrv, private $q, private templateSrv) { this.name = instanceSettings.name; this.id = instanceSettings.id; diff --git a/public/app/plugins/datasource/postgres/module.ts b/public/app/plugins/datasource/postgres/module.ts index a24971fa1a1..a4266183bcf 100644 --- a/public/app/plugins/datasource/postgres/module.ts +++ b/public/app/plugins/datasource/postgres/module.ts @@ -6,7 +6,7 @@ class PostgresConfigCtrl { current: any; - /** @ngInject **/ + /** @ngInject */ constructor($scope) { this.current.jsonData.sslmode = this.current.jsonData.sslmode || 'verify-full'; } @@ -27,7 +27,7 @@ class PostgresAnnotationsQueryCtrl { annotation: any; - /** @ngInject **/ + /** @ngInject */ constructor() { this.annotation.rawQuery = this.annotation.rawQuery || defaultQuery; } diff --git a/public/app/plugins/datasource/postgres/query_ctrl.ts b/public/app/plugins/datasource/postgres/query_ctrl.ts index a9073de22cf..fceca1e2037 100644 --- a/public/app/plugins/datasource/postgres/query_ctrl.ts +++ b/public/app/plugins/datasource/postgres/query_ctrl.ts @@ -31,7 +31,7 @@ export class PostgresQueryCtrl extends QueryCtrl { lastQueryError: string; showHelp: boolean; - /** @ngInject **/ + /** @ngInject */ constructor($scope, $injector) { super($scope, $injector); diff --git a/public/app/plugins/datasource/testdata/query_ctrl.ts b/public/app/plugins/datasource/testdata/query_ctrl.ts index dd5f59c0a5a..7a40d264f64 100644 --- a/public/app/plugins/datasource/testdata/query_ctrl.ts +++ b/public/app/plugins/datasource/testdata/query_ctrl.ts @@ -12,7 +12,7 @@ export class TestDataQueryCtrl extends QueryCtrl { newPointTime: any; selectedPoint: any; - /** @ngInject **/ + /** @ngInject */ constructor($scope, $injector, private backendSrv) { super($scope, $injector); diff --git a/public/app/plugins/panel/gettingstarted/module.ts b/public/app/plugins/panel/gettingstarted/module.ts index ebefad8af69..84f367a9430 100644 --- a/public/app/plugins/panel/gettingstarted/module.ts +++ b/public/app/plugins/panel/gettingstarted/module.ts @@ -8,7 +8,7 @@ class GettingStartedPanelCtrl extends PanelCtrl { stepIndex: number; steps: any; - /** @ngInject **/ + /** @ngInject */ constructor($scope, $injector, private backendSrv, datasourceSrv, private $q) { super($scope, $injector); diff --git a/public/app/plugins/panel/graph/axes_editor.ts b/public/app/plugins/panel/graph/axes_editor.ts index 4230acb571b..3d2dd4acbc5 100644 --- a/public/app/plugins/panel/graph/axes_editor.ts +++ b/public/app/plugins/panel/graph/axes_editor.ts @@ -9,7 +9,7 @@ export class AxesEditorCtrl { xAxisStatOptions: any; xNameSegment: any; - /** @ngInject **/ + /** @ngInject */ constructor(private $scope, private $q) { this.panelCtrl = $scope.ctrl; this.panel = this.panelCtrl.panel; @@ -76,7 +76,7 @@ export class AxesEditorCtrl { } } -/** @ngInject **/ +/** @ngInject */ export function axesEditorComponent() { 'use strict'; return { diff --git a/public/app/plugins/panel/graph/graph.ts b/public/app/plugins/panel/graph/graph.ts index 7dec2df1130..31adaac0c5f 100755 --- a/public/app/plugins/panel/graph/graph.ts +++ b/public/app/plugins/panel/graph/graph.ts @@ -735,7 +735,7 @@ class GraphElement { } } -/** @ngInject **/ +/** @ngInject */ function graphDirective(timeSrv, popoverSrv, contextSrv) { return { restrict: 'A', diff --git a/public/app/plugins/panel/text/module.ts b/public/app/plugins/panel/text/module.ts index 684bba124fc..ed446d1699b 100644 --- a/public/app/plugins/panel/text/module.ts +++ b/public/app/plugins/panel/text/module.ts @@ -14,7 +14,7 @@ export class TextPanelCtrl extends PanelCtrl { content: '# title', }; - /** @ngInject **/ + /** @ngInject */ constructor($scope, $injector, private templateSrv, private $sce) { super($scope, $injector); diff --git a/public/app/routes/routes.ts b/public/app/routes/routes.ts index d12711aca5b..55d76dc7239 100644 --- a/public/app/routes/routes.ts +++ b/public/app/routes/routes.ts @@ -8,7 +8,7 @@ import FolderPermissions from 'app/containers/ManageDashboards/FolderPermissions import TeamPages from 'app/containers/Teams/TeamPages'; import TeamList from 'app/containers/Teams/TeamList'; -/** @ngInject **/ +/** @ngInject */ export function setupAngularRoutes($routeProvider, $locationProvider) { $locationProvider.html5Mode(true); diff --git a/tslint.json b/tslint.json index e9caf1d7b38..0af9d285f64 100644 --- a/tslint.json +++ b/tslint.json @@ -25,6 +25,7 @@ "eofline": true, "forin": false, "indent": [true, "spaces", 2], + "jsdoc-format": true, "label-position": true, "max-line-length": [true, 150], "member-access": [true, "no-public"],