Skip to content

Commit

Permalink
fix prettier rules
Browse files Browse the repository at this point in the history
  • Loading branch information
mshustov committed Aug 26, 2020
1 parent de8c29c commit da5ed0f
Show file tree
Hide file tree
Showing 22 changed files with 80 additions and 76 deletions.
2 changes: 1 addition & 1 deletion src/fixtures/agg_resp/date_histogram.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default {
hits: [],
},
aggregations: {
'1': {
1: {
buckets: [
{
key_as_string: '2015-01-30T01:00:00.000Z',
Expand Down
2 changes: 1 addition & 1 deletion src/fixtures/agg_resp/range.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default {
hits: [],
},
aggregations: {
'1': {
1: {
buckets: {
'*-1024.0': {
to: 1024,
Expand Down
8 changes: 4 additions & 4 deletions src/legacy/server/status/lib/metrics.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ describe('Metrics', function () {
Object.defineProperty(process, 'pid', { get: pidMock }); //

const hapiEvent = {
requests: { '5603': { total: 22, disconnects: 0, statusCodes: { '200': 22 } } },
responseTimes: { '5603': { avg: 1.8636363636363635, max: 4 } },
requests: { 5603: { total: 22, disconnects: 0, statusCodes: { 200: 22 } } },
responseTimes: { 5603: { avg: 1.8636363636363635, max: 4 } },
osload: [2.20751953125, 2.02294921875, 1.89794921875],
osmem: { total: 17179869184, free: 102318080 },
osup: 1008991,
Expand Down Expand Up @@ -150,9 +150,9 @@ describe('Metrics', function () {
it('parses event with missing fields / NaN for responseTimes.avg', async () => {
const hapiEvent = {
requests: {
'5603': { total: 22, disconnects: 0, statusCodes: { '200': 22 } },
5603: { total: 22, disconnects: 0, statusCodes: { 200: 22 } },
},
responseTimes: { '5603': { avg: NaN, max: 4 } },
responseTimes: { 5603: { avg: NaN, max: 4 } },
host: 'blahblah.local',
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ describe('Url autocomplete', () => {

(function () {
const endpoints = {
'1': {
1: {
patterns: ['a/b'],
methods: ['GET'],
},
Expand Down Expand Up @@ -125,11 +125,11 @@ describe('Url autocomplete', () => {

(function () {
const endpoints = {
'1': {
1: {
patterns: ['a/b', 'a/b/{p}'],
methods: ['GET'],
},
'2': {
2: {
patterns: ['a/c'],
methods: ['GET'],
},
Expand Down Expand Up @@ -176,14 +176,14 @@ describe('Url autocomplete', () => {

(function () {
const endpoints = {
'1': {
1: {
patterns: ['a/{p}'],
url_components: {
p: ['a', 'b'],
},
methods: ['GET'],
},
'2': {
2: {
patterns: ['a/c'],
methods: ['GET'],
},
Expand Down Expand Up @@ -230,18 +230,18 @@ describe('Url autocomplete', () => {

(function () {
const endpoints = {
'1': {
1: {
patterns: ['a/{p}'],
url_components: {
p: ['a', 'b'],
},
methods: ['GET'],
},
'2': {
2: {
patterns: ['b/{p}'],
methods: ['GET'],
},
'3': {
3: {
patterns: ['b/{l}/c'],
methods: ['GET'],
url_components: {
Expand Down Expand Up @@ -315,7 +315,7 @@ describe('Url autocomplete', () => {

(function () {
const endpoints = {
'1': {
1: {
patterns: ['a/b/{p}/c/e'],
methods: ['GET'],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ interface SearchEmbeddableConfig {
filterManager: FilterManager;
}

export class SearchEmbeddable extends Embeddable<SearchInput, SearchOutput>
export class SearchEmbeddable
extends Embeddable<SearchInput, SearchOutput>
implements ISearchEmbeddable {
private readonly savedSearch: SavedSearch;
private $rootScope: ng.IRootScopeService;
Expand Down
9 changes: 5 additions & 4 deletions src/plugins/embeddable/public/lib/containers/container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,11 @@ import { isSavedObjectEmbeddableInput } from '../embeddables/saved_object_embedd
const getKeys = <T extends {}>(o: T): Array<keyof T> => Object.keys(o) as Array<keyof T>;

export abstract class Container<
TChildInput extends Partial<EmbeddableInput> = {},
TContainerInput extends ContainerInput<TChildInput> = ContainerInput<TChildInput>,
TContainerOutput extends ContainerOutput = ContainerOutput
> extends Embeddable<TContainerInput, TContainerOutput>
TChildInput extends Partial<EmbeddableInput> = {},
TContainerInput extends ContainerInput<TChildInput> = ContainerInput<TChildInput>,
TContainerOutput extends ContainerOutput = ContainerOutput
>
extends Embeddable<TContainerInput, TContainerOutput>
implements IContainer<TChildInput, TContainerInput, TContainerOutput> {
public readonly isContainer: boolean = true;
protected readonly children: {
Expand Down
24 changes: 12 additions & 12 deletions src/plugins/maps_legacy/public/map/grid_dimensions.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@ import _ from 'lodash';
// geohash precision mapping of geohash grid cell dimensions (width x height, in meters) at equator.
// https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-geohashgrid-aggregation.html#_cell_dimensions_at_the_equator
const gridAtEquator = {
'1': [5009400, 4992600],
'2': [1252300, 624100],
'3': [156500, 156000],
'4': [39100, 19500],
'5': [4900, 4900],
'6': [1200, 609.4],
'7': [152.9, 152.4],
'8': [38.2, 19],
'9': [4.8, 4.8],
'10': [1.2, 0.595],
'11': [0.149, 0.149],
'12': [0.037, 0.019],
1: [5009400, 4992600],
2: [1252300, 624100],
3: [156500, 156000],
4: [39100, 19500],
5: [4900, 4900],
6: [1200, 609.4],
7: [152.9, 152.4],
8: [38.2, 19],
9: [4.8, 4.8],
10: [1.2, 0.595],
11: [0.149, 0.149],
12: [0.037, 0.019],
};

export function gridDimensions(precision) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import { ErrorThatHandlesItsOwnResponse } from './types';

export type PreconfiguredActionDisabledFrom = 'update' | 'delete';

export class PreconfiguredActionDisabledModificationError extends Error
export class PreconfiguredActionDisabledModificationError
extends Error
implements ErrorThatHandlesItsOwnResponse {
public readonly disabledFrom: PreconfiguredActionDisabledFrom;

Expand Down
8 changes: 4 additions & 4 deletions x-pack/plugins/apm/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ export class ApmPlugin implements Plugin<ApmPluginSetup, ApmPluginStart> {
defaultMessage: 'Error rate',
}),
iconClass: 'bell',
alertParamsExpression: lazy(() =>
import('./components/shared/ErrorRateAlertTrigger')
alertParamsExpression: lazy(
() => import('./components/shared/ErrorRateAlertTrigger')
),
validate: () => ({
errors: [],
Expand All @@ -158,8 +158,8 @@ export class ApmPlugin implements Plugin<ApmPluginSetup, ApmPluginStart> {
defaultMessage: 'Transaction duration',
}),
iconClass: 'bell',
alertParamsExpression: lazy(() =>
import('./components/shared/TransactionDurationAlertTrigger')
alertParamsExpression: lazy(
() => import('./components/shared/TransactionDurationAlertTrigger')
),
validate: () => ({
errors: [],
Expand Down
20 changes: 10 additions & 10 deletions x-pack/plugins/canvas/public/lib/aeroelastic/layout_functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,18 +106,18 @@ const cornerVertices = [
const resizeMultiplierHorizontal = { left: -1, center: 0, right: 1 };
const resizeMultiplierVertical = { top: -1, center: 0, bottom: 1 };

const xNames = { '-1': 'left', '0': 'center', '1': 'right' };
const yNames = { '-1': 'top', '0': 'center', '1': 'bottom' };
const xNames = { '-1': 'left', 0: 'center', 1: 'right' };
const yNames = { '-1': 'top', 0: 'center', 1: 'bottom' };

const bidirectionalCursors = {
'0': 'ns-resize',
'45': 'nesw-resize',
'90': 'ew-resize',
'135': 'nwse-resize',
'180': 'ns-resize',
'225': 'nesw-resize',
'270': 'ew-resize',
'315': 'nwse-resize',
0: 'ns-resize',
45: 'nesw-resize',
90: 'ew-resize',
135: 'nwse-resize',
180: 'ns-resize',
225: 'nesw-resize',
270: 'ew-resize',
315: 'nwse-resize',
};

const identityAABB = () => [
Expand Down
6 changes: 3 additions & 3 deletions x-pack/plugins/canvas/public/state/actions/elements.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe('getSiblingContext', () => {
resolvedArgs: {
'element-foo': {
expressionContext: {
'0': {
0: {
state: 'ready',
value: {
type: 'datatable',
Expand All @@ -28,7 +28,7 @@ describe('getSiblingContext', () => {
},
error: null,
},
'1': {
1: {
state: 'ready',
value: {
type: 'datatable',
Expand All @@ -44,7 +44,7 @@ describe('getSiblingContext', () => {
},
error: null,
},
'2': {
2: {
state: 'ready',
value: {
type: 'pointseries',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,22 +162,22 @@ describe('resolved args reducer', () => {
resolvedArgs: {
'element-1': {
expressionContext: {
'1': {
1: {
state: 'ready',
value: 'test-1',
error: null,
},
'2': {
2: {
state: 'ready',
value: 'test-2',
error: null,
},
'3': {
3: {
state: 'ready',
value: 'test-3',
error: null,
},
'4': {
4: {
state: 'ready',
value: 'test-4',
error: null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ export const ACTION_EXPLORE_DATA_CHART = 'ACTION_EXPLORE_DATA_CHART';
* This is "Explore underlying data" action which appears in popup context
* menu when user clicks a value in visualization or brushes a time range.
*/
export class ExploreDataChartAction extends AbstractExploreDataAction<ExploreDataChartActionContext>
export class ExploreDataChartAction
extends AbstractExploreDataAction<ExploreDataChartActionContext>
implements Action<ExploreDataChartActionContext> {
public readonly id = ACTION_EXPLORE_DATA_CHART;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ export const ACTION_EXPLORE_DATA = 'ACTION_EXPLORE_DATA';
* This is "Explore underlying data" action which appears in the context
* menu of a dashboard panel.
*/
export class ExploreDataContextMenuAction extends AbstractExploreDataAction<EmbeddableContext>
export class ExploreDataContextMenuAction
extends AbstractExploreDataAction<EmbeddableContext>
implements Action<EmbeddableContext> {
public readonly id = ACTION_EXPLORE_DATA;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ export const sourceTitle = i18n.translate(
}
);

export class MVTSingleLayerVectorSource extends AbstractSource
export class MVTSingleLayerVectorSource
extends AbstractSource
implements ITiledSingleLayerVectorSource {
static createDescriptor({
urlTemplate,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ export interface IDynamicStyleProperty<T> extends IStyleProperty<T> {

export type FieldFormatter = (value: string | number | undefined) => string | number;

export class DynamicStyleProperty<T> extends AbstractStyleProperty<T>
export class DynamicStyleProperty<T>
extends AbstractStyleProperty<T>
implements IDynamicStyleProperty<T> {
static type = STYLE_TYPE.DYNAMIC;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const reducer: Reducer<State, Action> = (state, action) => {
indexName: value.indexName,
operation: Object.freeze(restOfOperation),
// prettier-ignore
shardName: `[${/* shard id */value.shard.id[0]}][${/* shard number */value.shard.id[2] }]`
shardName: `[${/* shard id */value.shard.id[0]}][${/* shard number */value.shard.id[2] }]`,
};
} else {
nextState.highlightDetails = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ interface HeaderProps {
const Header = styled.header.attrs(() => ({
className: 'siemHeaderSection',
}))<HeaderProps>`
${({ height }) =>
height &&
css`
height: ${height}px;
`}
${({ height }) =>
height &&
css`
height: ${height}px;
`}
margin-bottom: ${({ height, theme }) => (height ? 0 : theme.eui.euiSizeL)};
user-select: text;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,11 @@ export const Bar = styled.aside.attrs({
className: 'siemUtilityBar',
})<BarProps>`
${({ border, theme }) => css`
${
border &&
css`
border-bottom: ${theme.eui.euiBorderThin};
padding-bottom: ${theme.eui.paddingSizes.s};
`
}
${border &&
css`
border-bottom: ${theme.eui.euiBorderThin};
padding-bottom: ${theme.eui.paddingSizes.s};
`}
@media only screen and (min-width: ${theme.eui.euiBreakpoints.l}) {
display: flex;
Expand Down
4 changes: 2 additions & 2 deletions x-pack/plugins/triggers_actions_ui/public/application/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import { PluginStartContract as AlertingStart } from '../../../alerts/public';
import { suspendedComponentWithProps } from './lib/suspended_component_with_props';

const TriggersActionsUIHome = lazy(async () => import('./home'));
const AlertDetailsRoute = lazy(() =>
import('./sections/alert_details/components/alert_details_route')
const AlertDetailsRoute = lazy(
() => import('./sections/alert_details/components/alert_details_route')
);

export interface AppDeps {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ export interface ActionFactoryDefinition<
triggers: SupportedTriggers[];
},
ActionContext extends TriggerContextMapping[SupportedTriggers] = TriggerContextMapping[SupportedTriggers]
>
extends Partial<Omit<Presentable<FactoryContext>, 'getHref'>>,
> extends Partial<Omit<Presentable<FactoryContext>, 'getHref'>>,
Configurable<Config, FactoryContext> {
/**
* Unique ID of the action factory. This ID is used to identify this action
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ export default function ({ getService }: FtrProviderContext) {
searchId: 'search:a6d51430-ace2-11ea-815f-39e12f89a8c2',
postPayload: {
timerange: { timezone: 'UTC', min: '1979-01-01T10:00:00Z', max: '1981-01-01T10:00:00Z' }, // prettier-ignore
state: { query: { bool: { filter: [ { bool: { filter: [ { bool: { minimum_should_match: 1, should: [{ query_string: { fields: ['name'], query: 'Fel*' } }] } } ] } } ] } } } // prettier-ignore
state: { query: { bool: { filter: [ { bool: { filter: [ { bool: { minimum_should_match: 1, should: [{ query_string: { fields: ['name'], query: 'Fel*' } }] } } ] } } ] } } }, // prettier-ignore
},
isImmediate: true,
};
Expand Down

0 comments on commit da5ed0f

Please sign in to comment.