Skip to content

Commit

Permalink
fix eslint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mshustov committed Nov 25, 2019
1 parent 4b7e6b6 commit de1527c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
1 change: 1 addition & 0 deletions src/core/public/saved_objects/saved_objects_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import {
import {
isAutoCreateIndexError,
showAutoCreateIndexErrorPage,
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
} from '../../../legacy/ui/public/error_auto_create_index/error_auto_create_index';
import { SimpleSavedObject } from './simple_saved_object';
import { HttpFetchOptions, HttpServiceBase } from '../http';
Expand Down
1 change: 1 addition & 0 deletions src/core/server/legacy/plugins/find_legacy_plugin_specs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import {
// @ts-ignore
} from '../../../../legacy/plugin_discovery/find_plugin_specs.js';
import { LoggerFactory } from '../../logging';
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import { collectUiExports as collectLegacyUiExports } from '../../../../legacy/ui/ui_exports/collect_ui_exports';
import { Config } from '../../config';

Expand Down
12 changes: 6 additions & 6 deletions src/core/server/saved_objects/service/lib/repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

import { omit } from 'lodash';
import { CallCluster } from 'src/legacy/core_plugins/elasticsearch';
import { APICaller } from '../../../elasticsearch/';

import { getRootPropertiesObjects, IndexMapping } from '../../mappings';
import { getSearchDsl } from './search_dsl';
Expand Down Expand Up @@ -77,12 +77,12 @@ export interface SavedObjectsRepositoryOptions {
index: string;
config: Config;
mappings: IndexMapping;
callCluster: CallCluster;
callCluster: APICaller;
schema: SavedObjectsSchema;
serializer: SavedObjectsSerializer;
migrator: KibanaMigrator;
allowedTypes: string[];
onBeforeWrite?: (...args: Parameters<CallCluster>) => Promise<void>;
onBeforeWrite?: (...args: Parameters<APICaller>) => Promise<void>;
}

export interface IncrementCounterOptions extends SavedObjectsBaseOptions {
Expand All @@ -100,8 +100,8 @@ export class SavedObjectsRepository {
private _mappings: IndexMapping;
private _schema: SavedObjectsSchema;
private _allowedTypes: string[];
private _onBeforeWrite: (...args: Parameters<CallCluster>) => Promise<void>;
private _unwrappedCallCluster: CallCluster;
private _onBeforeWrite: (...args: Parameters<APICaller>) => Promise<void>;
private _unwrappedCallCluster: APICaller;
private _serializer: SavedObjectsSerializer;

constructor(options: SavedObjectsRepositoryOptions) {
Expand Down Expand Up @@ -136,7 +136,7 @@ export class SavedObjectsRepository {

this._onBeforeWrite = onBeforeWrite;

this._unwrappedCallCluster = async (...args: Parameters<CallCluster>) => {
this._unwrappedCallCluster = async (...args: Parameters<APICaller>) => {
await migrator.runMigrations();
return callCluster(...args);
};
Expand Down
6 changes: 3 additions & 3 deletions src/core/server/ui_settings/integration_tests/lib/servers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {
TestKibanaUtils,
TestUtils,
} from '../../../../../test_utils/kbn_server';
import { CallCluster } from '../../../../../legacy/core_plugins/elasticsearch';
import { APICaller } from '../../../elasticsearch/';

let servers: TestUtils;
let esServer: TestElasticsearchUtils;
Expand All @@ -36,7 +36,7 @@ let kbnServer: TestKibanaUtils['kbnServer'];
interface AllServices {
kbnServer: TestKibanaUtils['kbnServer'];
savedObjectsClient: SavedObjectsClientContract;
callCluster: CallCluster;
callCluster: APICaller;
uiSettings: IUiSettingsClient;
deleteKibanaIndex: typeof deleteKibanaIndex;
}
Expand All @@ -61,7 +61,7 @@ export async function startServers() {
kbnServer = kbn.kbnServer;
}

async function deleteKibanaIndex(callCluster: CallCluster) {
async function deleteKibanaIndex(callCluster: APICaller) {
const kibanaIndices = await callCluster('cat.indices', { index: '.kibana*', format: 'json' });
const indexNames = kibanaIndices.map((x: any) => x.index);
if (!indexNames.length) {
Expand Down

0 comments on commit de1527c

Please sign in to comment.