diff --git a/adminSiteClient/EditorBasicTab.tsx b/adminSiteClient/EditorBasicTab.tsx index 5885b38e43..c1904e6789 100644 --- a/adminSiteClient/EditorBasicTab.tsx +++ b/adminSiteClient/EditorBasicTab.tsx @@ -50,7 +50,7 @@ import { @observer class DimensionSlotView< - Editor extends AbstractChartEditor + Editor extends AbstractChartEditor, > extends React.Component<{ slot: DimensionSlot editor: Editor @@ -334,7 +334,7 @@ class DimensionSlotView< @observer class VariablesSection< - Editor extends AbstractChartEditor + Editor extends AbstractChartEditor, > extends React.Component<{ editor: Editor database: EditorDatabase @@ -369,7 +369,7 @@ class VariablesSection< @observer export class EditorBasicTab< - Editor extends AbstractChartEditor + Editor extends AbstractChartEditor, > extends React.Component<{ editor: Editor database: EditorDatabase diff --git a/adminSiteClient/EditorTextTab.tsx b/adminSiteClient/EditorTextTab.tsx index 0941e7e6d8..a2f81554ef 100644 --- a/adminSiteClient/EditorTextTab.tsx +++ b/adminSiteClient/EditorTextTab.tsx @@ -23,7 +23,7 @@ import { isChartViewEditorInstance } from "./ChartViewEditor.js" @observer export class EditorTextTab< - Editor extends AbstractChartEditor + Editor extends AbstractChartEditor, > extends Component<{ editor: Editor; errorMessages: ErrorMessages }> { @action.bound onSlug(slug: string) { this.props.editor.grapherState.slug = slugify(slug) diff --git a/adminSiteClient/GrapherConfigGridEditor.tsx b/adminSiteClient/GrapherConfigGridEditor.tsx index e74076bef1..e3b58a12f1 100644 --- a/adminSiteClient/GrapherConfigGridEditor.tsx +++ b/adminSiteClient/GrapherConfigGridEditor.tsx @@ -595,7 +595,7 @@ export class GrapherConfigGridEditor extends React.Component diff --git a/packages/@ourworldindata/explorer/src/Explorer.tsx b/packages/@ourworldindata/explorer/src/Explorer.tsx index b0c30296b9..b62acbafd5 100644 --- a/packages/@ourworldindata/explorer/src/Explorer.tsx +++ b/packages/@ourworldindata/explorer/src/Explorer.tsx @@ -509,7 +509,7 @@ export class Explorer @action.bound updateGrapherFromExplorer() { switch (this.explorerProgram.chartCreationMode) { case ExplorerChartCreationMode.FromGrapherId: - this.updateGrapherFromExplorerUsingGrapherId() + void this.updateGrapherFromExplorerUsingGrapherId() break case ExplorerChartCreationMode.FromVariableIds: void this.updateGrapherFromExplorerUsingVariableIds() diff --git a/packages/@ourworldindata/grapher/src/core/FetchingGrapher.tsx b/packages/@ourworldindata/grapher/src/core/FetchingGrapher.tsx index 2a1dfd6220..6b7aacff22 100644 --- a/packages/@ourworldindata/grapher/src/core/FetchingGrapher.tsx +++ b/packages/@ourworldindata/grapher/src/core/FetchingGrapher.tsx @@ -7,10 +7,7 @@ import { import React from "react" import { Grapher, GrapherState } from "./Grapher.js" import { loadVariableDataAndMetadata } from "./loadVariable.js" -import { - legacyToOwidTableAndDimensions, - legacyToOwidTableAndDimensionsWithMandatorySlug, -} from "./LegacyToOwidTable.js" +import { legacyToOwidTableAndDimensionsWithMandatorySlug } from "./LegacyToOwidTable.js" import { OwidTable } from "@ourworldindata/core-table" import { isEqual } from "@ourworldindata/utils" diff --git a/packages/@ourworldindata/grapher/src/core/Grapher.tsx b/packages/@ourworldindata/grapher/src/core/Grapher.tsx index b720f32132..88913da7e9 100644 --- a/packages/@ourworldindata/grapher/src/core/Grapher.tsx +++ b/packages/@ourworldindata/grapher/src/core/Grapher.tsx @@ -172,11 +172,7 @@ import { DefaultChartClass, } from "../chart/ChartTypeMap" import { Entity, SelectionArray } from "../selection/SelectionArray" -import { - legacyToOwidTableAndDimensions, - legacyToOwidTableAndDimensionsWithMandatorySlug, -} from "./LegacyToOwidTable" -import { ScatterPlotManager } from "../scatterCharts/ScatterPlotChartConstants" +import { legacyToOwidTableAndDimensionsWithMandatorySlug } from "./LegacyToOwidTable" import { autoDetectSeriesStrategy, autoDetectYColumnSlugs, @@ -1085,7 +1081,7 @@ export class GrapherState { get typeExceptWhenLineChartAndSingleTimeThenWillBeBarChart(): GrapherChartType { return this.isLineChartThatTurnedIntoDiscreteBarActive ? GRAPHER_CHART_TYPES.DiscreteBar - : this.activeChartType ?? GRAPHER_CHART_TYPES.LineChart + : (this.activeChartType ?? GRAPHER_CHART_TYPES.LineChart) } @computed get isLineChart(): boolean { @@ -1394,8 +1390,8 @@ export class GrapherState { return !isStatic ? "underline" : shouldIncludeDetailsInStaticExport - ? "superscript" - : "none" + ? "superscript" + : "none" } // required derived properties diff --git a/packages/@ourworldindata/grapher/src/core/LegacyToOwidTable.ts b/packages/@ourworldindata/grapher/src/core/LegacyToOwidTable.ts index b726e562cc..0ca6200802 100644 --- a/packages/@ourworldindata/grapher/src/core/LegacyToOwidTable.ts +++ b/packages/@ourworldindata/grapher/src/core/LegacyToOwidTable.ts @@ -361,8 +361,8 @@ export const legacyToOwidTableAndDimensions = ( const entityName = joinedVariablesTable.entityIdToNameMap.get(entityId) return entityName && selectedEntityColors - ? selectedEntityColors[entityName] ?? - ErrorValueTypes.UndefinedButShouldBeString + ? (selectedEntityColors[entityName] ?? + ErrorValueTypes.UndefinedButShouldBeString) : ErrorValueTypes.UndefinedButShouldBeString } @@ -456,7 +456,7 @@ const fullJoinTables = ( // not exist in the first table const firstTableDuplicateForIndices: [ OwidTable | undefined, - string[] | undefined + string[] | undefined, ] = [tables[0], sharedColumnNames] const defsToAddPerTable = [firstTableDuplicateForIndices] .concat(zip(tables, columnsToAddPerTable)) @@ -646,8 +646,8 @@ const columnDefFromOwidVariable = ( const type = isContinent ? ColumnTypeNames.Continent : variable.type - ? variableTypeToColumnType(variable.type) - : ColumnTypeNames.NumberOrString + ? variableTypeToColumnType(variable.type) + : ColumnTypeNames.NumberOrString // Sorted values for ordinal columns const sort = diff --git a/site/DataPageV2Content.tsx b/site/DataPageV2Content.tsx index eb87195a0f..49e34a0420 100644 --- a/site/DataPageV2Content.tsx +++ b/site/DataPageV2Content.tsx @@ -1,11 +1,7 @@ -import { useMemo, useEffect } from "react" +import { useMemo } from "react" import { FetchingGrapher, - fetchInputTableForConfig, - Grapher, GrapherProgrammaticInterface, - GrapherState, - MapChart, } from "@ourworldindata/grapher" import { REUSE_THIS_WORK_SECTION_ID, @@ -34,7 +30,6 @@ import MetadataSection from "./MetadataSection.js" import TopicTags from "./TopicTags.js" import { AttachmentsContext } from "./gdocs/AttachmentsContext.js" import { DocumentContext } from "./gdocs/DocumentContext.js" -import { reaction } from "mobx" import { GrapherWithFallback } from "./GrapherWithFallback.js" declare global {