From 86cb412b1df0dccb522c098a01055052957d7aa5 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 23 Jan 2024 11:41:24 +0000 Subject: [PATCH] Update dependency prettier to v3.2.4 (#81047) * Update dependency prettier to v3.2.4 * update sdk + run prettier --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Ashley Harrison --- .yarn/sdks/prettier/package.json | 2 +- e2e/cloud-plugins-suite/azure-monitor.spec.ts | 60 ++++--------------- e2e/utils/support/types.ts | 16 ++--- package.json | 4 +- .../transformations/transformers/reduce.ts | 4 +- packages/grafana-e2e/src/support/types.ts | 16 ++--- .../src/FlameGraph/rendering.ts | 4 +- .../src/components/Cascader/Cascader.tsx | 4 +- .../uPlot/config/UPlotScaleBuilder.ts | 8 +-- .../grafana-ui/src/components/uPlot/utils.ts | 4 +- .../src/graveyard/TimeSeries/utils.ts | 16 ++--- .../app/core/components/TimeSeries/utils.ts | 16 ++--- .../core/components/TimelineChart/utils.ts | 28 ++++----- .../history/richHistoryLocalStorageUtils.ts | 4 +- .../alerting/unified/AlertsFolderView.tsx | 4 +- .../components/rule-editor/QueryOptions.tsx | 6 +- .../components/silences/SilencesTable.tsx | 17 +++--- .../hooks/useCombinedRuleNamespaces.ts | 44 +++++++------- .../components/GenAI/GenAIButton.tsx | 8 +-- .../features/explore/TraceView/TraceView.tsx | 34 +++++------ .../live/centrifuge/LiveDataStream.test.ts | 4 +- .../transformers/calculateHeatmap/heatmap.ts | 4 +- .../components/AzureCheatSheet.tsx | 4 +- .../components/AzureCredentialsForm.tsx | 4 +- .../LogsQueryEditor/TimeManagement.tsx | 8 +-- .../CloudWatchLogsQueryRunner.test.ts | 10 ++-- .../configuration/AzureCredentialsForm.tsx | 4 +- public/app/plugins/panel/barchart/bars.ts | 10 ++-- .../panel/geomap/editor/FitMapViewEditor.tsx | 4 +- public/app/plugins/panel/heatmap/utils.ts | 12 ++-- .../app/plugins/panel/histogram/Histogram.tsx | 4 +- .../app/plugins/panel/nodeGraph/NodeGraph.tsx | 4 +- yarn.lock | 12 ++-- 33 files changed, 172 insertions(+), 211 deletions(-) diff --git a/.yarn/sdks/prettier/package.json b/.yarn/sdks/prettier/package.json index 4301e0948f1..e6c621dbb54 100644 --- a/.yarn/sdks/prettier/package.json +++ b/.yarn/sdks/prettier/package.json @@ -1,6 +1,6 @@ { "name": "prettier", - "version": "3.0.0-sdk", + "version": "3.2.4-sdk", "main": "./index.cjs", "type": "commonjs", "bin": "./bin/prettier.cjs" diff --git a/e2e/cloud-plugins-suite/azure-monitor.spec.ts b/e2e/cloud-plugins-suite/azure-monitor.spec.ts index 4f61c10ce0b..d58f2f776e7 100644 --- a/e2e/cloud-plugins-suite/azure-monitor.spec.ts +++ b/e2e/cloud-plugins-suite/azure-monitor.spec.ts @@ -89,62 +89,26 @@ const addAzureMonitorVariable = ( .type(`${type.replace('Azure', '').trim()}{enter}`); switch (type) { case AzureQueryType.ResourceGroupsQuery: - e2eSelectors.variableEditor.subscription - .input() - .find('input') - .type(`${options?.subscription}{enter}`); + e2eSelectors.variableEditor.subscription.input().find('input').type(`${options?.subscription}{enter}`); break; case AzureQueryType.LocationsQuery: - e2eSelectors.variableEditor.subscription - .input() - .find('input') - .type(`${options?.subscription}{enter}`); + e2eSelectors.variableEditor.subscription.input().find('input').type(`${options?.subscription}{enter}`); break; case AzureQueryType.NamespacesQuery: - e2eSelectors.variableEditor.subscription - .input() - .find('input') - .type(`${options?.subscription}{enter}`); - e2eSelectors.variableEditor.resourceGroup - .input() - .find('input') - .type(`${options?.resourceGroup}{enter}`); + e2eSelectors.variableEditor.subscription.input().find('input').type(`${options?.subscription}{enter}`); + e2eSelectors.variableEditor.resourceGroup.input().find('input').type(`${options?.resourceGroup}{enter}`); break; case AzureQueryType.ResourceNamesQuery: - e2eSelectors.variableEditor.subscription - .input() - .find('input') - .type(`${options?.subscription}{enter}`); - e2eSelectors.variableEditor.resourceGroup - .input() - .find('input') - .type(`${options?.resourceGroup}{enter}`); - e2eSelectors.variableEditor.namespace - .input() - .find('input') - .type(`${options?.namespace}{enter}`); - e2eSelectors.variableEditor.region - .input() - .find('input') - .type(`${options?.region}{enter}`); + e2eSelectors.variableEditor.subscription.input().find('input').type(`${options?.subscription}{enter}`); + e2eSelectors.variableEditor.resourceGroup.input().find('input').type(`${options?.resourceGroup}{enter}`); + e2eSelectors.variableEditor.namespace.input().find('input').type(`${options?.namespace}{enter}`); + e2eSelectors.variableEditor.region.input().find('input').type(`${options?.region}{enter}`); break; case AzureQueryType.MetricNamesQuery: - e2eSelectors.variableEditor.subscription - .input() - .find('input') - .type(`${options?.subscription}{enter}`); - e2eSelectors.variableEditor.resourceGroup - .input() - .find('input') - .type(`${options?.resourceGroup}{enter}`); - e2eSelectors.variableEditor.namespace - .input() - .find('input') - .type(`${options?.namespace}{enter}`); - e2eSelectors.variableEditor.resource - .input() - .find('input') - .type(`${options?.resource}{enter}`); + e2eSelectors.variableEditor.subscription.input().find('input').type(`${options?.subscription}{enter}`); + e2eSelectors.variableEditor.resourceGroup.input().find('input').type(`${options?.resourceGroup}{enter}`); + e2eSelectors.variableEditor.namespace.input().find('input').type(`${options?.namespace}{enter}`); + e2eSelectors.variableEditor.resource.input().find('input').type(`${options?.resource}{enter}`); break; } e2e.pages.Dashboard.Settings.Variables.Edit.General.submitButton().click(); diff --git a/e2e/utils/support/types.ts b/e2e/utils/support/types.ts index 193ad190b24..e7ccfe91db7 100644 --- a/e2e/utils/support/types.ts +++ b/e2e/utils/support/types.ts @@ -12,14 +12,14 @@ export type E2EFunctionWithOnlyOptions = (options?: CypressOptions) => Cypress.C export type TypeSelectors = S extends StringSelector ? E2EFunctionWithOnlyOptions : S extends FunctionSelector - ? E2EFunction - : S extends CssSelector - ? E2EFunction - : S extends UrlSelector - ? E2EVisit & Omit, 'url'> - : S extends Record - ? E2EFunctions - : S; + ? E2EFunction + : S extends CssSelector + ? E2EFunction + : S extends UrlSelector + ? E2EVisit & Omit, 'url'> + : S extends Record + ? E2EFunctions + : S; export type E2EFunctions = { [P in keyof S]: TypeSelectors; diff --git a/package.json b/package.json index 39521a718e2..c47b2f14560 100644 --- a/package.json +++ b/package.json @@ -192,7 +192,7 @@ "postcss-loader": "7.3.4", "postcss-reporter": "7.1.0", "postcss-scss": "4.0.9", - "prettier": "3.0.0", + "prettier": "3.2.4", "react-refresh": "0.14.0", "react-select-event": "5.5.1", "react-simple-compat": "1.2.3", @@ -431,7 +431,7 @@ }, "packageManager": "yarn@4.0.0", "dependenciesMeta": { - "prettier@3.0.0": { + "prettier@3.2.4": { "unplugged": true } } diff --git a/packages/grafana-data/src/transformations/transformers/reduce.ts b/packages/grafana-data/src/transformations/transformers/reduce.ts index b0c862ee788..1294903e83d 100644 --- a/packages/grafana-data/src/transformations/transformers/reduce.ts +++ b/packages/grafana-data/src/transformations/transformers/reduce.ts @@ -46,8 +46,8 @@ export const reduceTransformer: DataTransformerInfo = const matcher = options.fields ? getFieldMatcher(options.fields) : options.includeTimeField && options.mode === ReduceTransformerMode.ReduceFields - ? alwaysFieldMatcher - : notTimeFieldMatcher; + ? alwaysFieldMatcher + : notTimeFieldMatcher; // Collapse all matching fields into a single row if (options.mode === ReduceTransformerMode.ReduceFields) { diff --git a/packages/grafana-e2e/src/support/types.ts b/packages/grafana-e2e/src/support/types.ts index e44a978194c..60a275882ad 100644 --- a/packages/grafana-e2e/src/support/types.ts +++ b/packages/grafana-e2e/src/support/types.ts @@ -14,14 +14,14 @@ export type E2EFunctionWithOnlyOptions = (options?: CypressOptions) => Cypress.C export type TypeSelectors = S extends StringSelector ? E2EFunctionWithOnlyOptions : S extends FunctionSelector - ? E2EFunction - : S extends CssSelector - ? E2EFunction - : S extends UrlSelector - ? E2EVisit & Omit, 'url'> - : S extends Record - ? E2EFunctions - : S; + ? E2EFunction + : S extends CssSelector + ? E2EFunction + : S extends UrlSelector + ? E2EVisit & Omit, 'url'> + : S extends Record + ? E2EFunctions + : S; export type E2EFunctions = { [P in keyof S]: TypeSelectors; diff --git a/packages/grafana-flamegraph/src/FlameGraph/rendering.ts b/packages/grafana-flamegraph/src/FlameGraph/rendering.ts index 7e28eba7079..96b25b93abb 100644 --- a/packages/grafana-flamegraph/src/FlameGraph/rendering.ts +++ b/packages/grafana-flamegraph/src/FlameGraph/rendering.ts @@ -358,8 +358,8 @@ function useColorFunction( (colorScheme === ColorSchemeDiff.Default || colorScheme === ColorSchemeDiff.DiffColorBlind) ? getBarColorByDiff(item.value, item.valueRight!, totalTicks, totalTicksRight!, colorScheme) : colorScheme === ColorScheme.ValueBased - ? getBarColorByValue(item.value, totalTicks, rangeMin, rangeMax) - : getBarColorByPackage(label, theme); + ? getBarColorByValue(item.value, totalTicks, rangeMin, rangeMax) + : getBarColorByPackage(label, theme); if (matchedLabels) { // Means we are searching, we use color for matches and gray the rest diff --git a/packages/grafana-ui/src/components/Cascader/Cascader.tsx b/packages/grafana-ui/src/components/Cascader/Cascader.tsx index 27c8f03f176..538badcee58 100644 --- a/packages/grafana-ui/src/components/Cascader/Cascader.tsx +++ b/packages/grafana-ui/src/components/Cascader/Cascader.tsx @@ -133,8 +133,8 @@ export class Cascader extends PureComponent { const activeLabel = this.props.hideActiveLevelLabel ? '' : this.props.displayAllSelectedLevels - ? selectedOptions.map((option) => option.label).join(this.props.separator || DEFAULT_SEPARATOR) - : selectedOptions[selectedOptions.length - 1].label; + ? selectedOptions.map((option) => option.label).join(this.props.separator || DEFAULT_SEPARATOR) + : selectedOptions[selectedOptions.length - 1].label; this.setState({ rcValue: value, focusCascade: true, diff --git a/packages/grafana-ui/src/components/uPlot/config/UPlotScaleBuilder.ts b/packages/grafana-ui/src/components/uPlot/config/UPlotScaleBuilder.ts index 45313d9e3e5..1e2e6f74991 100644 --- a/packages/grafana-ui/src/components/uPlot/config/UPlotScaleBuilder.ts +++ b/packages/grafana-ui/src/components/uPlot/config/UPlotScaleBuilder.ts @@ -51,10 +51,10 @@ export class UPlotScaleBuilder extends PlotConfigBuilder { distr === ScaleDistribution.Symlog ? 4 : distr === ScaleDistribution.Log - ? 3 - : distr === ScaleDistribution.Ordinal - ? 2 - : 1, + ? 3 + : distr === ScaleDistribution.Ordinal + ? 2 + : 1, log: distr === ScaleDistribution.Log || distr === ScaleDistribution.Symlog ? this.props.log ?? 2 : undefined, asinh: distr === ScaleDistribution.Symlog ? this.props.linearThreshold ?? 1 : undefined, } diff --git a/packages/grafana-ui/src/components/uPlot/utils.ts b/packages/grafana-ui/src/components/uPlot/utils.ts index 1a3253013ca..85f67b256b7 100644 --- a/packages/grafana-ui/src/components/uPlot/utils.ts +++ b/packages/grafana-ui/src/components/uPlot/utils.ts @@ -123,8 +123,8 @@ export function getStackingGroups(frame: DataFrame) { drawStyle === GraphDrawStyle.Bars ? custom.barAlignment : drawStyle === GraphDrawStyle.Line - ? custom.lineInterpolation - : null; + ? custom.lineInterpolation + : null; let stackKey = `${stackDir}|${stackingMode}|${stackingGroup}|${buildScaleKey( config, diff --git a/packages/grafana-ui/src/graveyard/TimeSeries/utils.ts b/packages/grafana-ui/src/graveyard/TimeSeries/utils.ts index ad029097ba5..e29720df0be 100644 --- a/packages/grafana-ui/src/graveyard/TimeSeries/utils.ts +++ b/packages/grafana-ui/src/graveyard/TimeSeries/utils.ts @@ -259,16 +259,16 @@ export const preparePlotConfigBuilder: UPlotConfigPrepFn<{ return [dataMin, dataMax]; } : field.type === FieldType.enum - ? (u: uPlot, dataMin: number, dataMax: number) => { - // this is the exhaustive enum (stable) - let len = field.config.type!.enum!.text!.length; + ? (u: uPlot, dataMin: number, dataMax: number) => { + // this is the exhaustive enum (stable) + let len = field.config.type!.enum!.text!.length; - return [-1, len]; + return [-1, len]; - // these are only values that are present - // return [dataMin - 1, dataMax + 1] - } - : undefined, + // these are only values that are present + // return [dataMin - 1, dataMax + 1] + } + : undefined, decimals: field.config.decimals, }, field diff --git a/public/app/core/components/TimeSeries/utils.ts b/public/app/core/components/TimeSeries/utils.ts index 6aa5654292a..26fd636b457 100644 --- a/public/app/core/components/TimeSeries/utils.ts +++ b/public/app/core/components/TimeSeries/utils.ts @@ -260,16 +260,16 @@ export const preparePlotConfigBuilder: UPlotConfigPrepFn<{ return [dataMin, dataMax]; } : field.type === FieldType.enum - ? (u: uPlot, dataMin: number, dataMax: number) => { - // this is the exhaustive enum (stable) - let len = field.config.type!.enum!.text!.length; + ? (u: uPlot, dataMin: number, dataMax: number) => { + // this is the exhaustive enum (stable) + let len = field.config.type!.enum!.text!.length; - return [-1, len]; + return [-1, len]; - // these are only values that are present - // return [dataMin - 1, dataMax + 1] - } - : undefined, + // these are only values that are present + // return [dataMin - 1, dataMax + 1] + } + : undefined, decimals: field.config.decimals, }, field diff --git a/public/app/core/components/TimelineChart/utils.ts b/public/app/core/components/TimelineChart/utils.ts index a372190209b..489cd13222d 100644 --- a/public/app/core/components/TimelineChart/utils.ts +++ b/public/app/core/components/TimelineChart/utils.ts @@ -693,19 +693,19 @@ export function fmtDuration(milliSeconds: number): string { yr > 0 ? yr + 'y ' + (mo > 0 ? mo + 'mo ' : '') + (wk > 0 ? wk + 'w ' : '') + (d > 0 ? d + 'd ' : '') : mo > 0 - ? mo + 'mo ' + (wk > 0 ? wk + 'w ' : '') + (d > 0 ? d + 'd ' : '') - : wk > 0 - ? wk + 'w ' + (d > 0 ? d + 'd ' : '') - : d > 0 - ? d + 'd ' + (h > 0 ? h + 'h ' : '') - : h > 0 - ? h + 'h ' + (m > 0 ? m + 'm ' : '') - : m > 0 - ? m + 'm ' + (s > 0 ? s + 's ' : '') - : s > 0 - ? s + 's ' + (ms > 0 ? ms + 'ms ' : '') - : ms > 0 - ? ms + 'ms ' - : '0' + ? mo + 'mo ' + (wk > 0 ? wk + 'w ' : '') + (d > 0 ? d + 'd ' : '') + : wk > 0 + ? wk + 'w ' + (d > 0 ? d + 'd ' : '') + : d > 0 + ? d + 'd ' + (h > 0 ? h + 'h ' : '') + : h > 0 + ? h + 'h ' + (m > 0 ? m + 'm ' : '') + : m > 0 + ? m + 'm ' + (s > 0 ? s + 's ' : '') + : s > 0 + ? s + 's ' + (ms > 0 ? ms + 'ms ' : '') + : ms > 0 + ? ms + 'ms ' + : '0' ).trim(); } diff --git a/public/app/core/history/richHistoryLocalStorageUtils.ts b/public/app/core/history/richHistoryLocalStorageUtils.ts index f5ff6da8150..7f58de9a860 100644 --- a/public/app/core/history/richHistoryLocalStorageUtils.ts +++ b/public/app/core/history/richHistoryLocalStorageUtils.ts @@ -57,8 +57,8 @@ function filterQueriesBySearchFilter(queries: RichHistoryQuery[], searchFilter: const listOfMatchingQueries = query.queries.filter((query) => // Remove fields in which we don't want to be searching - Object.values(omit(query, ['datasource', 'key', 'refId', 'hide', 'queryType'])).some( - (value) => value?.toString().includes(searchFilter) + Object.values(omit(query, ['datasource', 'key', 'refId', 'hide', 'queryType'])).some((value) => + value?.toString().includes(searchFilter) ) ); diff --git a/public/app/features/alerting/unified/AlertsFolderView.tsx b/public/app/features/alerting/unified/AlertsFolderView.tsx index c07a3e65fe4..212acdc87f3 100644 --- a/public/app/features/alerting/unified/AlertsFolderView.tsx +++ b/public/app/features/alerting/unified/AlertsFolderView.tsx @@ -140,8 +140,8 @@ function useAlertsFolderViewParams() { sortParam === SortOrder.Ascending ? SortOrder.Ascending : sortParam === SortOrder.Descending - ? SortOrder.Descending - : undefined + ? SortOrder.Descending + : undefined ); useDebounce( diff --git a/public/app/features/alerting/unified/components/rule-editor/QueryOptions.tsx b/public/app/features/alerting/unified/components/rule-editor/QueryOptions.tsx index 87e6443b765..ba7857e0153 100644 --- a/public/app/features/alerting/unified/components/rule-editor/QueryOptions.tsx +++ b/public/app/features/alerting/unified/components/rule-editor/QueryOptions.tsx @@ -55,11 +55,7 @@ export const QueryOptions = ({
- - {dateTime(timeRange?.from) - .locale('en') - .fromNow(true)} - + {dateTime(timeRange?.from).locale('en').fromNow(true)} {queryOptions.maxDataPoints && , MD = {queryOptions.maxDataPoints}} {queryOptions.minInterval && , Min. Interval = {queryOptions.minInterval}}
diff --git a/public/app/features/alerting/unified/components/silences/SilencesTable.tsx b/public/app/features/alerting/unified/components/silences/SilencesTable.tsx index 5b33f85197b..3d8c21c4b83 100644 --- a/public/app/features/alerting/unified/components/silences/SilencesTable.tsx +++ b/public/app/features/alerting/unified/components/silences/SilencesTable.tsx @@ -146,15 +146,14 @@ const useFilteredSilences = (silences: Silence[], expired = false) => { } if (queryString) { const matchers = parseMatchers(queryString); - const matchersMatch = matchers.every( - (matcher) => - silence.matchers?.some( - ({ name, value, isEqual, isRegex }) => - matcher.name === name && - matcher.value === value && - matcher.isEqual === isEqual && - matcher.isRegex === isRegex - ) + const matchersMatch = matchers.every((matcher) => + silence.matchers?.some( + ({ name, value, isEqual, isRegex }) => + matcher.name === name && + matcher.value === value && + matcher.isEqual === isEqual && + matcher.isRegex === isRegex + ) ); if (!matchersMatch) { return false; diff --git a/public/app/features/alerting/unified/hooks/useCombinedRuleNamespaces.ts b/public/app/features/alerting/unified/hooks/useCombinedRuleNamespaces.ts index 52cf74df772..18fc75e3755 100644 --- a/public/app/features/alerting/unified/hooks/useCombinedRuleNamespaces.ts +++ b/public/app/features/alerting/unified/hooks/useCombinedRuleNamespaces.ts @@ -373,28 +373,28 @@ function rulerRuleToCombinedRule( filteredInstanceTotals: {}, } : isRecordingRulerRule(rule) - ? { - name: rule.record, - query: rule.expr, - labels: rule.labels || {}, - annotations: {}, - rulerRule: rule, - namespace, - group, - instanceTotals: {}, - filteredInstanceTotals: {}, - } - : { - name: rule.grafana_alert.title, - query: '', - labels: rule.labels || {}, - annotations: rule.annotations || {}, - rulerRule: rule, - namespace, - group, - instanceTotals: {}, - filteredInstanceTotals: {}, - }; + ? { + name: rule.record, + query: rule.expr, + labels: rule.labels || {}, + annotations: {}, + rulerRule: rule, + namespace, + group, + instanceTotals: {}, + filteredInstanceTotals: {}, + } + : { + name: rule.grafana_alert.title, + query: '', + labels: rule.labels || {}, + annotations: rule.annotations || {}, + rulerRule: rule, + namespace, + group, + instanceTotals: {}, + filteredInstanceTotals: {}, + }; } // find existing rule in group that matches the given prom rule diff --git a/public/app/features/dashboard/components/GenAI/GenAIButton.tsx b/public/app/features/dashboard/components/GenAI/GenAIButton.tsx index 6a01451bad0..3c2647a9a2f 100644 --- a/public/app/features/dashboard/components/GenAI/GenAIButton.tsx +++ b/public/app/features/dashboard/components/GenAI/GenAIButton.tsx @@ -78,10 +78,10 @@ export const GenAIButton = ({ const buttonItem = error ? AutoGenerateItem.erroredRetryButton : isFirstHistoryEntry - ? AutoGenerateItem.stopGenerationButton - : hasHistory - ? AutoGenerateItem.improveButton - : AutoGenerateItem.autoGenerateButton; + ? AutoGenerateItem.stopGenerationButton + : hasHistory + ? AutoGenerateItem.improveButton + : AutoGenerateItem.autoGenerateButton; reportInteraction(buttonItem); }; diff --git a/public/app/features/explore/TraceView/TraceView.tsx b/public/app/features/explore/TraceView/TraceView.tsx index d4afe959b4f..b6610e26f12 100644 --- a/public/app/features/explore/TraceView/TraceView.tsx +++ b/public/app/features/explore/TraceView/TraceView.tsx @@ -261,8 +261,8 @@ function useFocusSpanLink(options: { }) ); - const query = useSelector( - (state) => state.explore.panes[options.exploreId]?.queries.find((query) => query.refId === options.refId) + const query = useSelector((state) => + state.explore.panes[options.exploreId]?.queries.find((query) => query.refId === options.refId) ); const createFocusSpanLink = (traceId: string, spanId: string) => { @@ -297,22 +297,22 @@ function useFocusSpanLink(options: { onClickFn: sameTrace ? () => setFocusedSpanId(focusedSpanId === spanId ? undefined : spanId) : options.splitOpenFn - ? () => - options.splitOpenFn({ - datasourceUid: options.datasource?.uid!, - queries: [ - { - ...query!, - query: traceId, + ? () => + options.splitOpenFn({ + datasourceUid: options.datasource?.uid!, + queries: [ + { + ...query!, + query: traceId, + }, + ], + panelsState: { + trace: { + spanId, + }, }, - ], - panelsState: { - trace: { - spanId, - }, - }, - }) - : undefined, + }) + : undefined, replaceVariables: getTemplateSrv().replace.bind(getTemplateSrv()), }); }; diff --git a/public/app/features/live/centrifuge/LiveDataStream.test.ts b/public/app/features/live/centrifuge/LiveDataStream.test.ts index f8010aac647..1870d59ee79 100644 --- a/public/app/features/live/centrifuge/LiveDataStream.test.ts +++ b/public/app/features/live/centrifuge/LiveDataStream.test.ts @@ -898,8 +898,8 @@ describe('LiveDataStream', () => { return isStreamingResponseData(data, StreamingResponseDataType.FullFrame) ? fieldsOf(data) : isStreamingResponseData(data, StreamingResponseDataType.NewValuesSameSchema) - ? data.values - : response; + ? data.values + : response; }) ) ).toEqual({ diff --git a/public/app/features/transformers/calculateHeatmap/heatmap.ts b/public/app/features/transformers/calculateHeatmap/heatmap.ts index 3a57e5845b7..1de1d638361 100644 --- a/public/app/features/transformers/calculateHeatmap/heatmap.ts +++ b/public/app/features/transformers/calculateHeatmap/heatmap.ts @@ -323,8 +323,8 @@ export function calculateHeatmapFromData(frames: DataFrame[], options: HeatmapCa xBucketsCfg.mode === HeatmapCalculationMode.Size ? durationToMilliseconds(parseDuration(xBucketsCfg.value ?? '')) : xBucketsCfg.value - ? +xBucketsCfg.value - : undefined, + ? +xBucketsCfg.value + : undefined, yMode: yBucketsCfg.mode, ySize: yBucketsCfg.value ? +yBucketsCfg.value : undefined, yLog: diff --git a/public/app/plugins/datasource/azuremonitor/components/AzureCheatSheet.tsx b/public/app/plugins/datasource/azuremonitor/components/AzureCheatSheet.tsx index 7611ad31c92..d517a4854e2 100644 --- a/public/app/plugins/datasource/azuremonitor/components/AzureCheatSheet.tsx +++ b/public/app/plugins/datasource/azuremonitor/components/AzureCheatSheet.tsx @@ -60,8 +60,8 @@ const AzureCheatSheet = (props: AzureCheatSheetProps) => { return a.displayName.toLowerCase() === b.displayName.toLowerCase() ? 0 : a.displayName.toLowerCase() < b.displayName.toLowerCase() - ? -1 - : 1; + ? -1 + : 1; }); const alphabetizedQueries = result.categories.reduce( (queriesByCategory: CheatsheetQueries, category: Category) => { diff --git a/public/app/plugins/datasource/azuremonitor/components/AzureCredentialsForm.tsx b/public/app/plugins/datasource/azuremonitor/components/AzureCredentialsForm.tsx index 4b3c32b3e29..80fe46c8302 100644 --- a/public/app/plugins/datasource/azuremonitor/components/AzureCredentialsForm.tsx +++ b/public/app/plugins/datasource/azuremonitor/components/AzureCredentialsForm.tsx @@ -56,8 +56,8 @@ export const AzureCredentialsForm = (props: Props) => { const defaultAuthType = managedIdentityEnabled ? 'msi' : workloadIdentityEnabled - ? 'workloadidentity' - : 'clientsecret'; + ? 'workloadidentity' + : 'clientsecret'; const updated: AzureCredentials = { ...credentials, authType: selected.value || defaultAuthType, diff --git a/public/app/plugins/datasource/azuremonitor/components/LogsQueryEditor/TimeManagement.tsx b/public/app/plugins/datasource/azuremonitor/components/LogsQueryEditor/TimeManagement.tsx index f4432719ace..a97bea313bd 100644 --- a/public/app/plugins/datasource/azuremonitor/components/LogsQueryEditor/TimeManagement.tsx +++ b/public/app/plugins/datasource/azuremonitor/components/LogsQueryEditor/TimeManagement.tsx @@ -123,10 +123,10 @@ export function TimeManagement({ query, onQueryChange: onChange, schema }: Azure query.azureLogAnalytics?.timeColumn ? query.azureLogAnalytics?.timeColumn : defaultTimeColumns - ? defaultTimeColumns[0] - : timeColumns - ? timeColumns[0] - : { value: 'TimeGenerated', label: 'TimeGenerated' } + ? defaultTimeColumns[0] + : timeColumns + ? timeColumns[0] + : { value: 'TimeGenerated', label: 'TimeGenerated' } } allowCustomValue /> diff --git a/public/app/plugins/datasource/cloudwatch/query-runner/CloudWatchLogsQueryRunner.test.ts b/public/app/plugins/datasource/cloudwatch/query-runner/CloudWatchLogsQueryRunner.test.ts index 5bb8230e81d..47f683a214a 100644 --- a/public/app/plugins/datasource/cloudwatch/query-runner/CloudWatchLogsQueryRunner.test.ts +++ b/public/app/plugins/datasource/cloudwatch/query-runner/CloudWatchLogsQueryRunner.test.ts @@ -87,8 +87,9 @@ describe('CloudWatchLogsQueryRunner', () => { it('should stop querying when timed out', async () => { const { runner, queryMock } = setupMockedLogsQueryRunner(); const fakeFrames = genMockFrames(20); - const initialRecordsMatched = fakeFrames[0].meta!.stats!.find((stat) => stat.displayName === 'Records scanned')! - .value!; + const initialRecordsMatched = fakeFrames[0].meta!.stats!.find( + (stat) => stat.displayName === 'Records scanned' + )!.value!; for (let i = 1; i < 4; i++) { fakeFrames[i].meta!.stats = [ { @@ -98,8 +99,9 @@ describe('CloudWatchLogsQueryRunner', () => { ]; } - const finalRecordsMatched = fakeFrames[9].meta!.stats!.find((stat) => stat.displayName === 'Records scanned')! - .value!; + const finalRecordsMatched = fakeFrames[9].meta!.stats!.find( + (stat) => stat.displayName === 'Records scanned' + )!.value!; for (let i = 10; i < fakeFrames.length; i++) { fakeFrames[i].meta!.stats = [ { diff --git a/public/app/plugins/datasource/prometheus/configuration/AzureCredentialsForm.tsx b/public/app/plugins/datasource/prometheus/configuration/AzureCredentialsForm.tsx index 44e462f9d6a..7140dc34b62 100644 --- a/public/app/plugins/datasource/prometheus/configuration/AzureCredentialsForm.tsx +++ b/public/app/plugins/datasource/prometheus/configuration/AzureCredentialsForm.tsx @@ -95,8 +95,8 @@ export const AzureCredentialsForm = (props: Props) => { const defaultAuthType = managedIdentityEnabled ? 'msi' : workloadIdentityEnabled - ? 'workloadidentity' - : 'clientsecret'; + ? 'workloadidentity' + : 'clientsecret'; const updated: AzureCredentials = { ...credentials, authType: selected.value || defaultAuthType, diff --git a/public/app/plugins/panel/barchart/bars.ts b/public/app/plugins/panel/barchart/bars.ts index ac127b87134..9cc562781f0 100644 --- a/public/app/plugins/panel/barchart/bars.ts +++ b/public/app/plugins/panel/barchart/bars.ts @@ -289,11 +289,11 @@ export function getConfig(opts: BarsOptions, theme: GrafanaTheme2) { radius: pctStacked ? 0 : !isStacked - ? barRadius - : (u: uPlot, seriesIdx: number) => { - let isTopmostSeries = seriesIdx === u.data.length - 1; - return isTopmostSeries ? [barRadius, 0] : [0, 0]; - }, + ? barRadius + : (u: uPlot, seriesIdx: number) => { + let isTopmostSeries = seriesIdx === u.data.length - 1; + return isTopmostSeries ? [barRadius, 0] : [0, 0]; + }, disp: { x0: { unit: 2, diff --git a/public/app/plugins/panel/geomap/editor/FitMapViewEditor.tsx b/public/app/plugins/panel/geomap/editor/FitMapViewEditor.tsx index 576dacf042a..a88529a45ea 100644 --- a/public/app/plugins/panel/geomap/editor/FitMapViewEditor.tsx +++ b/public/app/plugins/panel/geomap/editor/FitMapViewEditor.tsx @@ -79,8 +79,8 @@ export const FitMapViewEditor = ({ labelWidth, value, onChange, context }: Props const currentDataScope = value.allLayers ? DataScopeValues.all : !value.allLayers && value.lastOnly - ? DataScopeValues.last - : DataScopeValues.layer; + ? DataScopeValues.last + : DataScopeValues.layer; const onDataScopeChange = (dataScope: DataScopeValues) => { if (dataScope !== DataScopeValues.all && !value.layer) { diff --git a/public/app/plugins/panel/heatmap/utils.ts b/public/app/plugins/panel/heatmap/utils.ts index fc7856b06dc..3b54f45e052 100644 --- a/public/app/plugins/panel/heatmap/utils.ts +++ b/public/app/plugins/panel/heatmap/utils.ts @@ -512,13 +512,13 @@ export function prepConfig(opts: PrepConfigOpts) { dataRef.current?.xLayout === HeatmapCellLayout.le ? -1 : dataRef.current?.xLayout === HeatmapCellLayout.ge - ? 1 - : 0, + ? 1 + : 0, yAlign: ((dataRef.current?.yLayout === HeatmapCellLayout.le ? -1 : dataRef.current?.yLayout === HeatmapCellLayout.ge - ? 1 - : 0) * (yAxisReverse ? -1 : 1)) as -1 | 0 | 1, + ? 1 + : 0) * (yAxisReverse ? -1 : 1)) as -1 | 0 | 1, ySizeDivisor, disp: { fill: { @@ -975,8 +975,8 @@ export const valuesToFills = (values: number[], palette: string[], minValue: num values[i] < minValue ? 0 : values[i] > maxValue - ? paletteSize - 1 - : Math.min(paletteSize - 1, Math.floor((paletteSize * (values[i] - minValue)) / range)); + ? paletteSize - 1 + : Math.min(paletteSize - 1, Math.floor((paletteSize * (values[i] - minValue)) / range)); } return indexedFills; diff --git a/public/app/plugins/panel/histogram/Histogram.tsx b/public/app/plugins/panel/histogram/Histogram.tsx index 922d19433f9..3d51f1ef0a9 100644 --- a/public/app/plugins/panel/histogram/Histogram.tsx +++ b/public/app/plugins/panel/histogram/Histogram.tsx @@ -100,8 +100,8 @@ const prepConfig = (frame: DataFrame, theme: GrafanaTheme2) => { distribution: isOrdinalX ? ScaleDistribution.Ordinal : useLogScale - ? ScaleDistribution.Log - : ScaleDistribution.Linear, + ? ScaleDistribution.Log + : ScaleDistribution.Linear, log: 2, orientation: ScaleOrientation.Horizontal, direction: ScaleDirection.Right, diff --git a/public/app/plugins/panel/nodeGraph/NodeGraph.tsx b/public/app/plugins/panel/nodeGraph/NodeGraph.tsx index ccd14fd12b3..f0053aada0f 100644 --- a/public/app/plugins/panel/nodeGraph/NodeGraph.tsx +++ b/public/app/plugins/panel/nodeGraph/NodeGraph.tsx @@ -305,8 +305,8 @@ const Nodes = memo(function Nodes(props: NodesProps) { !props.hoveringIds || props.hoveringIds.length === 0 ? 'default' : props.hoveringIds?.includes(n.id) - ? 'active' - : 'inactive' + ? 'active' + : 'inactive' } /> ))} diff --git a/yarn.lock b/yarn.lock index f4b7267e186..5a8fbe2a722 100644 --- a/yarn.lock +++ b/yarn.lock @@ -17188,7 +17188,7 @@ __metadata: postcss-loader: "npm:7.3.4" postcss-reporter: "npm:7.1.0" postcss-scss: "npm:4.0.9" - prettier: "npm:3.0.0" + prettier: "npm:3.2.4" prismjs: "npm:1.29.0" prop-types: "npm:15.8.1" pseudoizer: "npm:^0.1.0" @@ -17279,7 +17279,7 @@ __metadata: yaml: "npm:^2.0.0" yargs: "npm:^17.5.1" dependenciesMeta: - prettier@3.0.0: + prettier@3.2.4: unplugged: true languageName: unknown linkType: soft @@ -23702,12 +23702,12 @@ __metadata: languageName: node linkType: hard -"prettier@npm:3.0.0": - version: 3.0.0 - resolution: "prettier@npm:3.0.0" +"prettier@npm:3.2.4": + version: 3.2.4 + resolution: "prettier@npm:3.2.4" bin: prettier: bin/prettier.cjs - checksum: 399292638280988ecd44db6532e908246b7c9468e6f5f571b3835a5206b7f1132cb674c12be430d921474901dc85398429dfd2dc31b282eef9affebd3ce72cef + checksum: e2b735d0552501b3a7ac8bd3ba3b6de2920bb35bd4cd02d08cb9057ebe3e96d83b9a7e4b903d987b7530a50223b12c74d107c154337236ae2c68156ba1e65cd2 languageName: node linkType: hard