mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
chore(ao): remove eslint disable when possible (#164478)
This commit is contained in:
parent
b270602601
commit
631d9c2bd6
6 changed files with 14 additions and 15 deletions
|
@ -14,8 +14,7 @@ import { metricsExplorerMetricRT } from './metrics_explorer';
|
|||
import { TimeUnitChar } from '../utils/formatters/duration';
|
||||
import { SNAPSHOT_CUSTOM_AGGREGATIONS } from './constants';
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
||||
interface DeepPartialArray<T> extends Array<DeepPartial<T>> {}
|
||||
type DeepPartialArray<T> = Array<DeepPartial<T>>;
|
||||
|
||||
type DeepPartialObject<T> = { [P in keyof T]+?: DeepPartial<T[P]> };
|
||||
export type DeepPartial<T> = T extends any[]
|
||||
|
|
|
@ -21,8 +21,10 @@ interface Params {
|
|||
sloIds?: SloId[];
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
|
||||
export type SloRule = { sloId: string; name: string };
|
||||
export interface SloRule extends Record<string, unknown> {
|
||||
sloId: string;
|
||||
name: string;
|
||||
}
|
||||
|
||||
interface RuleApiResponse {
|
||||
page: number;
|
||||
|
|
|
@ -12,16 +12,15 @@ import type { RuleStatus } from '@kbn/triggers-actions-ui-plugin/public';
|
|||
import { rulesLocatorID } from '../../common';
|
||||
import { RULES_PATH } from '../../common/locators/paths';
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
|
||||
export type RulesParams = {
|
||||
export interface RulesParams extends SerializableRecord {
|
||||
lastResponse?: string[];
|
||||
params?: Record<string, string | number>;
|
||||
search?: string;
|
||||
status?: RuleStatus[];
|
||||
type?: string[];
|
||||
};
|
||||
}
|
||||
|
||||
export interface RulesLocatorParams extends RulesParams, SerializableRecord {}
|
||||
export type RulesLocatorParams = RulesParams;
|
||||
|
||||
export class RulesLocatorDefinition implements LocatorDefinition<RulesLocatorParams> {
|
||||
public readonly id = rulesLocatorID;
|
||||
|
|
|
@ -10,10 +10,9 @@ import type { LocatorDefinition } from '@kbn/share-plugin/public';
|
|||
import { sloDetailsLocatorID } from '../../common';
|
||||
import { SLOS_PATH } from '../../common/locators/paths';
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
|
||||
export type SloDetailsParams = {
|
||||
export interface SloDetailsParams {
|
||||
sloId?: string;
|
||||
};
|
||||
}
|
||||
|
||||
export interface SloDetailsLocatorParams extends SloDetailsParams, SerializableRecord {}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ interface AlertTestInstance {
|
|||
state: any;
|
||||
}
|
||||
|
||||
let persistAlertInstances = false; // eslint-disable-line prefer-const
|
||||
const persistAlertInstances = false;
|
||||
|
||||
type TestRuleState = Record<string, unknown> & {
|
||||
aRuleStateKey: string;
|
||||
|
|
|
@ -50,14 +50,14 @@ export type MetricThresholdRuleTypeState = RuleTypeState & {
|
|||
groupBy?: string | string[];
|
||||
};
|
||||
export type MetricThresholdAlertState = AlertState; // no specific instance state used
|
||||
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
|
||||
export type MetricThresholdAlertContext = {
|
||||
|
||||
export interface MetricThresholdAlertContext extends Record<string, unknown> {
|
||||
alertDetailsUrl: string;
|
||||
groupings?: object;
|
||||
reason?: string;
|
||||
timestamp: string; // ISO string
|
||||
value?: Array<number | null> | null;
|
||||
};
|
||||
}
|
||||
|
||||
export const FIRED_ACTIONS_ID = 'threshold.fired';
|
||||
export const NO_DATA_ACTIONS_ID = 'threshold.nodata';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue