mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: Fix more TypeScript strict errors (#37066)
* Chore: Fix more TypeScript strict errors * whoops
This commit is contained in:
parent
7815ed511f
commit
3004a650b5
@ -5,7 +5,7 @@ import { UserPicker } from 'app/core/components/Select/UserPicker';
|
|||||||
import { TeamPicker } from 'app/core/components/Select/TeamPicker';
|
import { TeamPicker } from 'app/core/components/Select/TeamPicker';
|
||||||
import { Button, Form, HorizontalGroup, Select, stylesFactory } from '@grafana/ui';
|
import { Button, Form, HorizontalGroup, Select, stylesFactory } from '@grafana/ui';
|
||||||
import { GrafanaTheme, SelectableValue } from '@grafana/data';
|
import { GrafanaTheme, SelectableValue } from '@grafana/data';
|
||||||
import { Team, User } from 'app/types';
|
import { OrgUser, Team } from 'app/types';
|
||||||
import {
|
import {
|
||||||
dashboardPermissionLevels,
|
dashboardPermissionLevels,
|
||||||
dashboardAclTargets,
|
dashboardAclTargets,
|
||||||
@ -58,7 +58,7 @@ class AddPermissions extends Component<Props, NewDashboardAclItem> {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
onUserSelected = (user: User) => {
|
onUserSelected = (user: SelectableValue<OrgUser['userId']>) => {
|
||||||
this.setState({ userId: user && !Array.isArray(user) ? user.id : 0 });
|
this.setState({ userId: user && !Array.isArray(user) ? user.id : 0 });
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -9,10 +9,11 @@ import { AsyncSelect } from '@grafana/ui';
|
|||||||
import { getBackendSrv } from '@grafana/runtime';
|
import { getBackendSrv } from '@grafana/runtime';
|
||||||
|
|
||||||
// Types
|
// Types
|
||||||
import { User } from 'app/types';
|
import { OrgUser } from 'app/types';
|
||||||
|
import { SelectableValue } from '@grafana/data';
|
||||||
|
|
||||||
export interface Props {
|
export interface Props {
|
||||||
onSelected: (user: User) => void;
|
onSelected: (user: SelectableValue<OrgUser['userId']>) => void;
|
||||||
className?: string;
|
className?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -43,8 +44,8 @@ export class UserPicker extends Component<Props, State> {
|
|||||||
|
|
||||||
return getBackendSrv()
|
return getBackendSrv()
|
||||||
.get(`/api/org/users/lookup?query=${query}&limit=100`)
|
.get(`/api/org/users/lookup?query=${query}&limit=100`)
|
||||||
.then((result: any) => {
|
.then((result: OrgUser[]) => {
|
||||||
return result.map((user: any) => ({
|
return result.map((user) => ({
|
||||||
id: user.userId,
|
id: user.userId,
|
||||||
value: user.userId,
|
value: user.userId,
|
||||||
label: user.login,
|
label: user.login,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { createSlice, PayloadAction } from '@reduxjs/toolkit';
|
import { createSlice, PayloadAction, Draft } from '@reduxjs/toolkit';
|
||||||
import {
|
import {
|
||||||
DashboardAclDTO,
|
DashboardAclDTO,
|
||||||
DashboardInitError,
|
DashboardInitError,
|
||||||
@ -32,13 +32,13 @@ const dashbardSlice = createSlice({
|
|||||||
loadDashboardPermissions: (state, action: PayloadAction<DashboardAclDTO[]>) => {
|
loadDashboardPermissions: (state, action: PayloadAction<DashboardAclDTO[]>) => {
|
||||||
state.permissions = processAclItems(action.payload);
|
state.permissions = processAclItems(action.payload);
|
||||||
},
|
},
|
||||||
dashboardInitFetching: (state, action: PayloadAction) => {
|
dashboardInitFetching: (state) => {
|
||||||
state.initPhase = DashboardInitPhase.Fetching;
|
state.initPhase = DashboardInitPhase.Fetching;
|
||||||
},
|
},
|
||||||
dashboardInitServices: (state, action: PayloadAction) => {
|
dashboardInitServices: (state) => {
|
||||||
state.initPhase = DashboardInitPhase.Services;
|
state.initPhase = DashboardInitPhase.Services;
|
||||||
},
|
},
|
||||||
dashboardInitSlow: (state, action: PayloadAction) => {
|
dashboardInitSlow: (state) => {
|
||||||
state.isInitSlow = true;
|
state.isInitSlow = true;
|
||||||
},
|
},
|
||||||
dashboardInitCompleted: (state, action: PayloadAction<DashboardModel>) => {
|
dashboardInitCompleted: (state, action: PayloadAction<DashboardModel>) => {
|
||||||
@ -59,7 +59,7 @@ const dashbardSlice = createSlice({
|
|||||||
return new DashboardModel({ title: 'Dashboard init failed' }, { canSave: false, canEdit: false });
|
return new DashboardModel({ title: 'Dashboard init failed' }, { canSave: false, canEdit: false });
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
cleanUpDashboard: (state, action: PayloadAction) => {
|
cleanUpDashboard: (state) => {
|
||||||
state.panels = {};
|
state.panels = {};
|
||||||
state.initPhase = DashboardInitPhase.NotStarted;
|
state.initPhase = DashboardInitPhase.NotStarted;
|
||||||
state.isInitSlow = false;
|
state.isInitSlow = false;
|
||||||
@ -69,17 +69,17 @@ const dashbardSlice = createSlice({
|
|||||||
setDashboardQueriesToUpdateOnLoad: (state, action: PayloadAction<QueriesToUpdateOnDashboardLoad>) => {
|
setDashboardQueriesToUpdateOnLoad: (state, action: PayloadAction<QueriesToUpdateOnDashboardLoad>) => {
|
||||||
state.modifiedQueries = action.payload;
|
state.modifiedQueries = action.payload;
|
||||||
},
|
},
|
||||||
clearDashboardQueriesToUpdateOnLoad: (state, action: PayloadAction) => {
|
clearDashboardQueriesToUpdateOnLoad: (state) => {
|
||||||
state.modifiedQueries = null;
|
state.modifiedQueries = null;
|
||||||
},
|
},
|
||||||
panelModelAndPluginReady: (state: DashboardState, action: PayloadAction<PanelModelAndPluginReadyPayload>) => {
|
panelModelAndPluginReady: (state, action: PayloadAction<PanelModelAndPluginReadyPayload>) => {
|
||||||
updatePanelState(state, action.payload.panelId, { plugin: action.payload.plugin });
|
updatePanelState(state, action.payload.panelId, { plugin: action.payload.plugin });
|
||||||
},
|
},
|
||||||
cleanUpEditPanel: (state, action: PayloadAction) => {
|
cleanUpEditPanel: (state) => {
|
||||||
// TODO: refactor, since the state should be mutated by copying only
|
// TODO: refactor, since the state should be mutated by copying only
|
||||||
delete state.panels[EDIT_PANEL_ID];
|
delete state.panels[EDIT_PANEL_ID];
|
||||||
},
|
},
|
||||||
setPanelAngularComponent: (state: DashboardState, action: PayloadAction<SetPanelAngularComponentPayload>) => {
|
setPanelAngularComponent: (state, action: PayloadAction<SetPanelAngularComponentPayload>) => {
|
||||||
updatePanelState(state, action.payload.panelId, { angularComponent: action.payload.angularComponent });
|
updatePanelState(state, action.payload.panelId, { angularComponent: action.payload.angularComponent });
|
||||||
},
|
},
|
||||||
addPanel: (state, action: PayloadAction<PanelModel>) => {
|
addPanel: (state, action: PayloadAction<PanelModel>) => {
|
||||||
@ -89,7 +89,7 @@ const dashbardSlice = createSlice({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export function updatePanelState(state: DashboardState, panelId: number, ps: Partial<PanelState>) {
|
export function updatePanelState(state: Draft<DashboardState>, panelId: number, ps: Partial<PanelState>) {
|
||||||
if (!state.panels[panelId]) {
|
if (!state.panels[panelId]) {
|
||||||
state.panels[panelId] = ps as PanelState;
|
state.panels[panelId] = ps as PanelState;
|
||||||
} else {
|
} else {
|
||||||
|
@ -24,8 +24,8 @@ export class PanelCtrl {
|
|||||||
$injector: auto.IInjectorService;
|
$injector: auto.IInjectorService;
|
||||||
$timeout: any;
|
$timeout: any;
|
||||||
editModeInitiated = false;
|
editModeInitiated = false;
|
||||||
height: number;
|
declare height: number;
|
||||||
width: number;
|
declare width: number;
|
||||||
containerHeight: any;
|
containerHeight: any;
|
||||||
events: EventBusExtended;
|
events: EventBusExtended;
|
||||||
loading = false;
|
loading = false;
|
||||||
|
@ -14,15 +14,15 @@ export const queryParamsToPreserve: { [key: string]: boolean } = {
|
|||||||
|
|
||||||
export class PlaylistSrv {
|
export class PlaylistSrv {
|
||||||
private nextTimeoutId: any;
|
private nextTimeoutId: any;
|
||||||
private dashboards: Array<{ url: string }>;
|
private declare dashboards: Array<{ url: string }>;
|
||||||
private index: number;
|
private index = 0;
|
||||||
private interval: number;
|
private declare interval: number;
|
||||||
private startUrl: string;
|
private declare startUrl: string;
|
||||||
private numberOfLoops = 0;
|
private numberOfLoops = 0;
|
||||||
private validPlaylistUrl: string;
|
private declare validPlaylistUrl: string;
|
||||||
private locationListenerUnsub?: () => void;
|
private locationListenerUnsub?: () => void;
|
||||||
|
|
||||||
isPlaying: boolean;
|
isPlaying = false;
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
this.locationUpdated = this.locationUpdated.bind(this);
|
this.locationUpdated = this.locationUpdated.bind(this);
|
||||||
|
@ -3,7 +3,7 @@ import { connect } from 'react-redux';
|
|||||||
import { SlideDown } from 'app/core/components/Animations/SlideDown';
|
import { SlideDown } from 'app/core/components/Animations/SlideDown';
|
||||||
import { UserPicker } from 'app/core/components/Select/UserPicker';
|
import { UserPicker } from 'app/core/components/Select/UserPicker';
|
||||||
import { TagBadge } from 'app/core/components/TagFilter/TagBadge';
|
import { TagBadge } from 'app/core/components/TagFilter/TagBadge';
|
||||||
import { TeamMember, User } from 'app/types';
|
import { TeamMember, OrgUser } from 'app/types';
|
||||||
import { addTeamMember } from './state/actions';
|
import { addTeamMember } from './state/actions';
|
||||||
import { getSearchMemberQuery, isSignedInUserTeamAdmin } from './state/selectors';
|
import { getSearchMemberQuery, isSignedInUserTeamAdmin } from './state/selectors';
|
||||||
import { FilterInput } from 'app/core/components/FilterInput/FilterInput';
|
import { FilterInput } from 'app/core/components/FilterInput/FilterInput';
|
||||||
@ -14,6 +14,7 @@ import TeamMemberRow from './TeamMemberRow';
|
|||||||
import { setSearchMemberQuery } from './state/reducers';
|
import { setSearchMemberQuery } from './state/reducers';
|
||||||
import { CloseButton } from 'app/core/components/CloseButton/CloseButton';
|
import { CloseButton } from 'app/core/components/CloseButton/CloseButton';
|
||||||
import { Button } from '@grafana/ui';
|
import { Button } from '@grafana/ui';
|
||||||
|
import { SelectableValue } from '@grafana/data';
|
||||||
|
|
||||||
export interface Props {
|
export interface Props {
|
||||||
members: TeamMember[];
|
members: TeamMember[];
|
||||||
@ -27,7 +28,7 @@ export interface Props {
|
|||||||
|
|
||||||
export interface State {
|
export interface State {
|
||||||
isAdding: boolean;
|
isAdding: boolean;
|
||||||
newTeamMember?: User | null;
|
newTeamMember?: SelectableValue<OrgUser['userId']> | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class TeamMembers extends PureComponent<Props, State> {
|
export class TeamMembers extends PureComponent<Props, State> {
|
||||||
@ -44,7 +45,7 @@ export class TeamMembers extends PureComponent<Props, State> {
|
|||||||
this.setState({ isAdding: !this.state.isAdding });
|
this.setState({ isAdding: !this.state.isAdding });
|
||||||
};
|
};
|
||||||
|
|
||||||
onUserSelected = (user: User) => {
|
onUserSelected = (user: SelectableValue<OrgUser['userId']>) => {
|
||||||
this.setState({ newTeamMember: user });
|
this.setState({ newTeamMember: user });
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ export interface State {
|
|||||||
const pageLimit = 30;
|
const pageLimit = 30;
|
||||||
|
|
||||||
export class UsersListPage extends PureComponent<Props, State> {
|
export class UsersListPage extends PureComponent<Props, State> {
|
||||||
externalUserMngInfoHtml: string;
|
declare externalUserMngInfoHtml: string;
|
||||||
|
|
||||||
constructor(props: Props) {
|
constructor(props: Props) {
|
||||||
super(props);
|
super(props);
|
||||||
|
@ -30,8 +30,8 @@ type TypeaheadContext = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export class CloudWatchLanguageProvider extends LanguageProvider {
|
export class CloudWatchLanguageProvider extends LanguageProvider {
|
||||||
started: boolean;
|
started = false;
|
||||||
initialRange: AbsoluteTimeRange;
|
declare initialRange: AbsoluteTimeRange;
|
||||||
datasource: CloudWatchDatasource;
|
datasource: CloudWatchDatasource;
|
||||||
|
|
||||||
constructor(datasource: CloudWatchDatasource, initialValues?: any) {
|
constructor(datasource: CloudWatchDatasource, initialValues?: any) {
|
||||||
|
@ -93,8 +93,8 @@ function getElasticsearchQuery(prometheusLabels: string[][]): string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default class ElasticsearchLanguageProvider extends LanguageProvider {
|
export default class ElasticsearchLanguageProvider extends LanguageProvider {
|
||||||
request: (url: string, params?: any) => Promise<any>;
|
declare request: (url: string, params?: any) => Promise<any>;
|
||||||
start: () => Promise<any[]>;
|
declare start: () => Promise<any[]>;
|
||||||
datasource: ElasticDatasource;
|
datasource: ElasticDatasource;
|
||||||
|
|
||||||
constructor(datasource: ElasticDatasource, initialValues?: any) {
|
constructor(datasource: ElasticDatasource, initialValues?: any) {
|
||||||
|
@ -4,8 +4,8 @@ export class AzureMonitorAnnotationsQueryCtrl {
|
|||||||
static templateUrl = 'partials/annotations.editor.html';
|
static templateUrl = 'partials/annotations.editor.html';
|
||||||
datasource: any;
|
datasource: any;
|
||||||
annotation: any;
|
annotation: any;
|
||||||
workspaces: any[];
|
declare workspaces: any[];
|
||||||
subscriptions: Array<{ text: string; value: string }>;
|
declare subscriptions: Array<{ text: string; value: string }>;
|
||||||
|
|
||||||
defaultQuery =
|
defaultQuery =
|
||||||
'<your table>\n| where $__timeFilter() \n| project TimeGenerated, Text=YourTitleColumn, Tags="tag1,tag2"';
|
'<your table>\n| where $__timeFilter() \n| project TimeGenerated, Text=YourTitleColumn, Tags="tag1,tag2"';
|
||||||
|
@ -34,7 +34,7 @@ export default class AzureLogAnalyticsDatasource extends DataSourceWithBackend<
|
|||||||
> {
|
> {
|
||||||
resourcePath: string;
|
resourcePath: string;
|
||||||
azurePortalUrl: string;
|
azurePortalUrl: string;
|
||||||
applicationId: string;
|
declare applicationId: string;
|
||||||
|
|
||||||
defaultSubscriptionId?: string;
|
defaultSubscriptionId?: string;
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ import { AzureLogsTableData, AzureLogsVariable } from '../types';
|
|||||||
import { AzureLogAnalyticsMetadata } from '../types/logAnalyticsMetadata';
|
import { AzureLogAnalyticsMetadata } from '../types/logAnalyticsMetadata';
|
||||||
|
|
||||||
export default class ResponseParser {
|
export default class ResponseParser {
|
||||||
columns: string[];
|
declare columns: string[];
|
||||||
constructor(private results: any) {}
|
constructor(private results: any) {}
|
||||||
|
|
||||||
parseQueryResult(): any {
|
parseQueryResult(): any {
|
||||||
|
@ -47,8 +47,8 @@ export default class AzureMonitorDatasource extends DataSourceWithBackend<AzureM
|
|||||||
defaultSubscriptionId?: string;
|
defaultSubscriptionId?: string;
|
||||||
resourcePath: string;
|
resourcePath: string;
|
||||||
azurePortalUrl: string;
|
azurePortalUrl: string;
|
||||||
resourceGroup: string;
|
declare resourceGroup: string;
|
||||||
resourceName: string;
|
declare resourceName: string;
|
||||||
supportedMetricNamespaces: string[] = [];
|
supportedMetricNamespaces: string[] = [];
|
||||||
timeSrv: TimeSrv;
|
timeSrv: TimeSrv;
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ export default class Datasource extends DataSourceApi<AzureMonitorQuery, AzureDa
|
|||||||
| InsightsAnalyticsDatasource;
|
| InsightsAnalyticsDatasource;
|
||||||
} = {};
|
} = {};
|
||||||
|
|
||||||
optionsKey: Record<AzureQueryType, string>;
|
declare optionsKey: Record<AzureQueryType, string>;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
instanceSettings: DataSourceInstanceSettings<AzureDataSourceJsonData>,
|
instanceSettings: DataSourceInstanceSettings<AzureDataSourceJsonData>,
|
||||||
|
@ -132,7 +132,7 @@ export class AzureMonitorQueryCtrl extends QueryCtrl {
|
|||||||
showLastQuery = false;
|
showLastQuery = false;
|
||||||
lastQuery = '';
|
lastQuery = '';
|
||||||
lastQueryError?: string;
|
lastQueryError?: string;
|
||||||
subscriptions: Array<{ text: string; value: string }>;
|
subscriptions: Array<{ text: string; value: string }> = [];
|
||||||
|
|
||||||
/** @ngInject */
|
/** @ngInject */
|
||||||
constructor($scope: any, $injector: auto.IInjectorService, private templateSrv: TemplateSrv) {
|
constructor($scope: any, $injector: auto.IInjectorService, private templateSrv: TemplateSrv) {
|
||||||
|
@ -990,7 +990,7 @@ export class FuncInstance {
|
|||||||
def: FuncDef;
|
def: FuncDef;
|
||||||
params: Array<string | number>;
|
params: Array<string | number>;
|
||||||
text: any;
|
text: any;
|
||||||
added: boolean;
|
declare added: boolean;
|
||||||
/**
|
/**
|
||||||
* Hidden functions are not displayed in UI but available in text editor
|
* Hidden functions are not displayed in UI but available in text editor
|
||||||
* This is used for seriesByTagUsed function which when used switches
|
* This is used for seriesByTagUsed function which when used switches
|
||||||
|
@ -25,10 +25,10 @@ import { ChangeEvent } from 'react';
|
|||||||
export class GraphiteQueryCtrl extends QueryCtrl {
|
export class GraphiteQueryCtrl extends QueryCtrl {
|
||||||
static templateUrl = 'partials/query.editor.html';
|
static templateUrl = 'partials/query.editor.html';
|
||||||
|
|
||||||
queryModel: GraphiteQuery;
|
declare queryModel: GraphiteQuery;
|
||||||
segments: any[] = [];
|
segments: any[] = [];
|
||||||
addTagSegments: any[] = [];
|
addTagSegments: any[] = [];
|
||||||
removeTagValue: string;
|
declare removeTagValue: string;
|
||||||
supportsTags = false;
|
supportsTags = false;
|
||||||
paused = false;
|
paused = false;
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ import { TemplateSrv } from '@grafana/runtime';
|
|||||||
|
|
||||||
export default class InfluxQueryModel {
|
export default class InfluxQueryModel {
|
||||||
target: InfluxQuery;
|
target: InfluxQuery;
|
||||||
selectModels: any[];
|
selectModels: any[] = [];
|
||||||
queryBuilder: any;
|
queryBuilder: any;
|
||||||
groupByParts: any;
|
groupByParts: any;
|
||||||
templateSrv: any;
|
templateSrv: any;
|
||||||
|
@ -34,7 +34,7 @@ const LOGQL_EXAMPLES = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
export default class LokiCheatSheet extends PureComponent<QueryEditorHelpProps<LokiQuery>, { userExamples: string[] }> {
|
export default class LokiCheatSheet extends PureComponent<QueryEditorHelpProps<LokiQuery>, { userExamples: string[] }> {
|
||||||
userLabelTimer: NodeJS.Timeout;
|
declare userLabelTimer: NodeJS.Timeout;
|
||||||
state = {
|
state = {
|
||||||
userExamples: DEFAULT_EXAMPLES,
|
userExamples: DEFAULT_EXAMPLES,
|
||||||
};
|
};
|
||||||
|
@ -89,7 +89,7 @@ interface PromQueryFieldState {
|
|||||||
|
|
||||||
class PromQueryField extends React.PureComponent<PromQueryFieldProps, PromQueryFieldState> {
|
class PromQueryField extends React.PureComponent<PromQueryFieldProps, PromQueryFieldState> {
|
||||||
plugins: Plugin[];
|
plugins: Plugin[];
|
||||||
languageProviderInitializationPromise: CancelablePromise<any>;
|
declare languageProviderInitializationPromise: CancelablePromise<any>;
|
||||||
|
|
||||||
constructor(props: PromQueryFieldProps, context: React.Context<any>) {
|
constructor(props: PromQueryFieldProps, context: React.Context<any>) {
|
||||||
super(props, context);
|
super(props, context);
|
||||||
|
@ -67,10 +67,10 @@ export default class PromQlLanguageProvider extends LanguageProvider {
|
|||||||
timeRange?: { start: number; end: number };
|
timeRange?: { start: number; end: number };
|
||||||
metrics: string[];
|
metrics: string[];
|
||||||
metricsMetadata?: PromMetricsMetadata;
|
metricsMetadata?: PromMetricsMetadata;
|
||||||
startTask: Promise<any>;
|
declare startTask: Promise<any>;
|
||||||
datasource: PrometheusDatasource;
|
datasource: PrometheusDatasource;
|
||||||
labelKeys: string[];
|
labelKeys: string[] = [];
|
||||||
labelFetchTs: number;
|
declare labelFetchTs: number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cache for labels of series. This is bit simplistic in the sense that it just counts responses each as a 1 and does
|
* Cache for labels of series. This is bit simplistic in the sense that it just counts responses each as a 1 and does
|
||||||
|
@ -65,7 +65,7 @@ class GraphElement {
|
|||||||
eventManager: EventManager;
|
eventManager: EventManager;
|
||||||
thresholdManager?: ThresholdManager;
|
thresholdManager?: ThresholdManager;
|
||||||
timeRegionManager: TimeRegionManager;
|
timeRegionManager: TimeRegionManager;
|
||||||
legendElem: HTMLElement;
|
declare legendElem: HTMLElement;
|
||||||
|
|
||||||
constructor(private scope: any, private elem: JQuery, private timeSrv: TimeSrv) {
|
constructor(private scope: any, private elem: JQuery, private timeSrv: TimeSrv) {
|
||||||
this.ctrl = scope.ctrl;
|
this.ctrl = scope.ctrl;
|
||||||
|
@ -3,7 +3,7 @@ set -e
|
|||||||
|
|
||||||
echo -e "Collecting code stats (typescript errors & more)"
|
echo -e "Collecting code stats (typescript errors & more)"
|
||||||
|
|
||||||
ERROR_COUNT_LIMIT=198
|
ERROR_COUNT_LIMIT=157
|
||||||
ERROR_COUNT="$(./node_modules/.bin/tsc --project tsconfig.json --noEmit --strict true | grep -oP 'Found \K(\d+)')"
|
ERROR_COUNT="$(./node_modules/.bin/tsc --project tsconfig.json --noEmit --strict true | grep -oP 'Found \K(\d+)')"
|
||||||
|
|
||||||
if [ "$ERROR_COUNT" -gt $ERROR_COUNT_LIMIT ]; then
|
if [ "$ERROR_COUNT" -gt $ERROR_COUNT_LIMIT ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user