diff --git a/x-pack/legacy/plugins/fleet/public/components/search_bar.tsx b/x-pack/legacy/plugins/fleet/public/components/search_bar.tsx index f0641e413c4c6..4739d53a6953c 100644 --- a/x-pack/legacy/plugins/fleet/public/components/search_bar.tsx +++ b/x-pack/legacy/plugins/fleet/public/components/search_bar.tsx @@ -78,11 +78,9 @@ function useSuggestions(fieldPrefix: string, search: string) { const fetchSuggestions = async () => { try { - const esSuggestions = (await elasticsearch.getSuggestions( - debouncedSearch, - debouncedSearch.length, - fieldPrefix - )).map(suggestion => ({ + const esSuggestions = ( + await elasticsearch.getSuggestions(debouncedSearch, debouncedSearch.length, fieldPrefix) + ).map(suggestion => ({ label: suggestion.text, description: suggestion.description || '', type: transformSuggestionType(suggestion.type), diff --git a/x-pack/legacy/plugins/fleet/public/lib/adapters/agent/rest_agent_adapter.ts b/x-pack/legacy/plugins/fleet/public/lib/adapters/agent/rest_agent_adapter.ts index ad5cd8e016faf..2d1bd3ade8d69 100644 --- a/x-pack/legacy/plugins/fleet/public/lib/adapters/agent/rest_agent_adapter.ts +++ b/x-pack/legacy/plugins/fleet/public/lib/adapters/agent/rest_agent_adapter.ts @@ -50,9 +50,9 @@ export class RestAgentAdapter extends AgentAdapter { public async getWithToken(enrollmentToken: string): Promise { try { - return (await this.REST.get>( - `/api/fleet/agent/unknown/${enrollmentToken}` - )).item; + return ( + await this.REST.get>(`/api/fleet/agent/unknown/${enrollmentToken}`) + ).item; } catch (e) { return null; } diff --git a/x-pack/legacy/plugins/fleet/public/lib/compose/scripts.ts b/x-pack/legacy/plugins/fleet/public/lib/compose/scripts.ts index cd328af207374..f6a0b3bc9fbab 100644 --- a/x-pack/legacy/plugins/fleet/public/lib/compose/scripts.ts +++ b/x-pack/legacy/plugins/fleet/public/lib/compose/scripts.ts @@ -17,7 +17,11 @@ import { FrontendLibs } from '../types'; export function compose(basePath: string): FrontendLibs { const api = new NodeAxiosAPIAdapter('elastic', 'changeme', basePath); - const esAdapter = new MemoryElasticsearchAdapter(() => true, () => '', []); + const esAdapter = new MemoryElasticsearchAdapter( + () => true, + () => '', + [] + ); const elasticsearchLib = new ElasticsearchLib(esAdapter); const agents = new AgentsLib(new RestAgentAdapter(api)); diff --git a/x-pack/legacy/plugins/fleet/server/libs/agent.contract.test.ts b/x-pack/legacy/plugins/fleet/server/libs/agent.contract.test.ts index b2f0cece5be18..5b257a5e39f88 100644 --- a/x-pack/legacy/plugins/fleet/server/libs/agent.contract.test.ts +++ b/x-pack/legacy/plugins/fleet/server/libs/agent.contract.test.ts @@ -49,11 +49,13 @@ describe('Agent lib', () => { const agentIds: string[] = []; for (const agent of agents) { agentIds.push( - (await soAdapter.create(getUser(), 'agents', { - ...agent, - local_metadata: JSON.stringify(agent.local_metadata || {}), - user_provided_metadata: JSON.stringify(agent.user_provided_metadata || {}), - })).id + ( + await soAdapter.create(getUser(), 'agents', { + ...agent, + local_metadata: JSON.stringify(agent.local_metadata || {}), + user_provided_metadata: JSON.stringify(agent.user_provided_metadata || {}), + }) + ).id ); } return agentIds; diff --git a/x-pack/legacy/plugins/fleet/server/libs/agent.ts b/x-pack/legacy/plugins/fleet/server/libs/agent.ts index e80e251ff4a88..cdfe029deca40 100644 --- a/x-pack/legacy/plugins/fleet/server/libs/agent.ts +++ b/x-pack/legacy/plugins/fleet/server/libs/agent.ts @@ -98,7 +98,10 @@ export class AgentLib { if (agents.length === 0) { hasMore = false; } - await this.unenroll(user, agents.map(a => a.id)); + await this.unenroll( + user, + agents.map(a => a.id) + ); } } diff --git a/x-pack/legacy/plugins/ingest/server/libs/adapters/policy/default.ts b/x-pack/legacy/plugins/ingest/server/libs/adapters/policy/default.ts index 02dec7201ea41..d6efbd9ae718e 100644 --- a/x-pack/legacy/plugins/ingest/server/libs/adapters/policy/default.ts +++ b/x-pack/legacy/plugins/ingest/server/libs/adapters/policy/default.ts @@ -101,13 +101,15 @@ export class PolicyAdapter { page: number = 1, perPage: number = 25 ): Promise { - const policys = (await this.so.find({ - type: 'policies', - search: sharedID, - searchFields: ['shared_id'], - page, - perPage, - })).saved_objects; + const policys = ( + await this.so.find({ + type: 'policies', + search: sharedID, + searchFields: ['shared_id'], + page, + perPage, + }) + ).saved_objects; if (!activeOnly) { const backupPolicies = await this.so.find({