diff --git a/README.md b/README.md index 414725532ca..3bee8ef4c0f 100644 --- a/README.md +++ b/README.md @@ -85,11 +85,8 @@ The following is an excerpt explaining the origin of this repo and what the alte > Using our own system has very important advantages: > > - **Integration with our global development database**: Our database of global development metrics is integrated into our visualization tool so that when we add and update empirical data the visualizations are all updated. (In contrast to this, a pre-existing tool would make the exploration of a database impossible and would require the preparation of each dataset separately for each visualisation.) -> > - **Flexibility**: We can use automation to change our entire system all at once. For example, if we decide we want to use a different source referencing style, we could easily update this across hundreds of charts. This makes it possible to scale our publication and to sustainably improve our work without starting from scratch at each round. -> > - **Risk mitigation**: We hope(!) that Our World in Data is a long-term project and we want the visualizations we produce to continue to be useful and available years from now. An external web service may be shut down or change for reasons we cannot control. We have had this experience in the past and learned our lesson from it. -> > - **Keeping everything up-to-date**: Because we want to be a useful resource for some time we make sure that we have a technology in place that allows us to keep all of our work up-to-date without starting from scratch each time. We have our global development database directly integrated in the Grapher and as soon as new data becomes available (for example from a UN agency) we can run a script that pulls in that data and updates all the visualizations that present that data. --- diff --git a/adminSiteClient/Forms.tsx b/adminSiteClient/Forms.tsx index b1087093b12..e952fa05c52 100644 --- a/adminSiteClient/Forms.tsx +++ b/adminSiteClient/Forms.tsx @@ -740,7 +740,7 @@ export class BindString extends React.Component<{ @observer export class BindAutoString< T extends { [field: string]: any }, - K extends Extract + K extends Extract, > extends React.Component<{ field: K store: T @@ -843,7 +843,7 @@ class FloatField extends React.Component { @observer export class BindFloat< T extends { [field: string]: any }, - K extends Extract + K extends Extract, > extends React.Component<{ field: K store: T @@ -874,7 +874,7 @@ export class BindFloat< @observer export class BindAutoFloat< T extends { [field: string]: any }, - K extends Extract + K extends Extract, > extends React.Component<{ field: K store: T diff --git a/adminSiteClient/admin.scss b/adminSiteClient/admin.scss index 454181361de..bb7d613da1c 100644 --- a/adminSiteClient/admin.scss +++ b/adminSiteClient/admin.scss @@ -837,7 +837,9 @@ main:not(.ChartEditorPage):not(.GdocsEditPage) { // to override the default annoying blue border from bootstrap on file upload .custom-file-input:focus ~ .custom-file-control { - box-shadow: 0 0 0 0.075rem #fff, 0 0 0 0.2rem #fff; + box-shadow: + 0 0 0 0.075rem #fff, + 0 0 0 0.2rem #fff; } .TagsIndexPage { @@ -1174,7 +1176,9 @@ main:not(.ChartEditorPage):not(.GdocsEditPage) { padding: 1.2em; border-radius: 0.4em; margin: 0.4em 0; - box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); + box-shadow: + 0 1px 3px rgba(0, 0, 0, 0.12), + 0 1px 2px rgba(0, 0, 0, 0.24); } .import-form { input { @@ -1210,7 +1214,9 @@ main:not(.ChartEditorPage):not(.GdocsEditPage) { border-radius: 0.4rem; opacity: 0.87; color: #fff; - box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); + box-shadow: + 0 1px 3px rgba(0, 0, 0, 0.12), + 0 1px 2px rgba(0, 0, 0, 0.24); } .message.bg-warning { @@ -1224,7 +1230,9 @@ main:not(.ChartEditorPage):not(.GdocsEditPage) { padding: 1.2em; border-radius: 0.4em; margin: 0.4em 0; - box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); + box-shadow: + 0 1px 3px rgba(0, 0, 0, 0.12), + 0 1px 2px rgba(0, 0, 0, 0.24); } } @@ -1272,7 +1280,8 @@ main:not(.ChartEditorPage):not(.GdocsEditPage) { position: sticky; top: 0; z-index: 2; - box-shadow: rgba(0, 0, 0, 0.12) 0px 1px 3px, + box-shadow: + rgba(0, 0, 0, 0.12) 0px 1px 3px, rgba(0, 0, 0, 0.24) 0px 1px 2px; background: #fff; &.draft { diff --git a/adminSiteClient/styles/react-tag-autocomplete.scss b/adminSiteClient/styles/react-tag-autocomplete.scss index 289ef708e66..a757867cf91 100644 --- a/adminSiteClient/styles/react-tag-autocomplete.scss +++ b/adminSiteClient/styles/react-tag-autocomplete.scss @@ -134,7 +134,8 @@ background: #ffffff; border: 1px solid #afb8c1; border-radius: 6px; - box-shadow: rgba(0, 0, 0, 0.1) 0 10px 15px -4px, + box-shadow: + rgba(0, 0, 0, 0.1) 0 10px 15px -4px, rgba(0, 0, 0, 0.05) 0 4px 6px -2px; } diff --git a/adminSiteServer/IndexPage.tsx b/adminSiteServer/IndexPage.tsx index e553a57a2a8..0c9c188f095 100644 --- a/adminSiteServer/IndexPage.tsx +++ b/adminSiteServer/IndexPage.tsx @@ -17,8 +17,8 @@ export const IndexPage = (props: { window.admin = new Admin({ username: "${ props.username }", isSuperuser: ${props.isSuperuser.toString()}, settings: ${JSON.stringify( - { ENV, GITHUB_USERNAME, DATA_API_FOR_ADMIN_UI } - )}}) + { ENV, GITHUB_USERNAME, DATA_API_FOR_ADMIN_UI } + )}}) admin.start(document.querySelector("#app"), '${props.gitCmsBranchName}') ` diff --git a/adminSiteServer/apiRouter.ts b/adminSiteServer/apiRouter.ts index 25abbfd6b1b..45c4a14afac 100644 --- a/adminSiteServer/apiRouter.ts +++ b/adminSiteServer/apiRouter.ts @@ -1728,9 +1728,8 @@ apiRouter.get( await Chart.assignTagsForCharts(charts) - const grapherConfig = await getMergedGrapherConfigForVariable( - variableId - ) + const grapherConfig = + await getMergedGrapherConfigForVariable(variableId) if ( grapherConfig && (!grapherConfig.dimensions || grapherConfig.dimensions.length === 0) diff --git a/baker/GrapherBaker.tsx b/baker/GrapherBaker.tsx index ea53958a04a..8b5e74794f4 100644 --- a/baker/GrapherBaker.tsx +++ b/baker/GrapherBaker.tsx @@ -223,9 +223,8 @@ export async function renderDataPageV2({ pageGrapher?: GrapherInterface publishedExplorersBySlug?: Record }) { - const grapherConfigForVariable = await getMergedGrapherConfigForVariable( - variableId - ) + const grapherConfigForVariable = + await getMergedGrapherConfigForVariable(variableId) const grapher = mergePartialGrapherConfigs( grapherConfigForVariable, pageGrapher diff --git a/baker/formatWordpressPost.tsx b/baker/formatWordpressPost.tsx index cc54c4570bf..67db2683f2c 100644 --- a/baker/formatWordpressPost.tsx +++ b/baker/formatWordpressPost.tsx @@ -173,9 +173,8 @@ export const formatWordpressPost = async ( } }) - const dataValuesConfigurationsMap = await extractDataValuesConfiguration( - html - ) + const dataValuesConfigurationsMap = + await extractDataValuesConfiguration(html) const dataValues = new Map() for (const [ dataValueConfigurationString, diff --git a/baker/formatting.tsx b/baker/formatting.tsx index ce7a852dc7e..727f1b642e6 100644 --- a/baker/formatting.tsx +++ b/baker/formatting.tsx @@ -86,7 +86,7 @@ export const parseKeyValueArgs = (text: string): KeyValueProps => { const [, name, value] = option.match(optionRegex) as [ any, string, - string + string, ] let parsedValue if (value === "" || value === "true") parsedValue = true diff --git a/db/model/Gdoc/rawToEnriched.ts b/db/model/Gdoc/rawToEnriched.ts index 25bfacf8eda..4343b48e90a 100644 --- a/db/model/Gdoc/rawToEnriched.ts +++ b/db/model/Gdoc/rawToEnriched.ts @@ -1295,11 +1295,12 @@ export function parseFaqs( id: faq.id, content: enrichedText, parseErrors: compact([ - ...enrichedText.flatMap((block) => - block?.parseErrors.map((parseError) => ({ - ...parseError, - message: `Block parse error in faq with id "${faq.id}": ${parseError.message}`, - })) + ...enrichedText.flatMap( + (block) => + block?.parseErrors.map((parseError) => ({ + ...parseError, + message: `Block parse error in faq with id "${faq.id}": ${parseError.message}`, + })) ), ]), } diff --git a/devTools/regionsUpdater/update.ts b/devTools/regionsUpdater/update.ts index 46194268fe0..e99077b4e42 100644 --- a/devTools/regionsUpdater/update.ts +++ b/devTools/regionsUpdater/update.ts @@ -47,7 +47,7 @@ interface Entity { members?: string[] } -function prettifiedJson(obj: any) { +function prettifiedJson(obj: any): Promise { // make sure the json we emit is diff-able even after running prettier on the repo return prettier.format(JSON.stringify(obj), { parser: "json", @@ -70,7 +70,7 @@ function csvToJson(val: string, col: string) { } } -function prettifiedTopology(geoJson: FeatureCollection) { +function prettifiedTopology(geoJson: FeatureCollection): Promise { // make sure the MapTopology.ts file will be diff-able even after running prettier on the repo let topoData = topology({ world: geoJson }), arcs = _.remove(topoData.arcs), @@ -95,9 +95,11 @@ function prettifiedTopology(geoJson: FeatureCollection) { tabWidth: 4, semi: false, }) - .replace( - /^( arcs:\s*\[)\]/m, - `\n // prettier-ignore\n$1\n ${arcJson}\n ]` + .then((formatted) => + formatted.replace( + /^( arcs:\s*\[)\]/m, + `\n // prettier-ignore\n$1\n ${arcJson}\n ]` + ) ) } @@ -258,13 +260,13 @@ async function main() { }) // generate new MapTopology.ts file and compare to old version - let newTopology = prettifiedTopology(owidGeoJson) + let newTopology = await prettifiedTopology(owidGeoJson) if (await didChange(GRAPHER_TOPOLOGY_PATH, newTopology)) { await writeFile(GRAPHER_TOPOLOGY_PATH, newTopology) } // generate new regions.json file and compare to old version - let regionsJson = prettifiedJson(entities) + let regionsJson = await prettifiedJson(entities) if (await didChange(GRAPHER_REGIONS_PATH, regionsJson)) { await writeFile(GRAPHER_REGIONS_PATH, regionsJson) let diff = execFileSync("git", [ diff --git a/devTools/svgTester/diff-generator.ts b/devTools/svgTester/diff-generator.ts index 1900e1e6b9d..a631896621c 100644 --- a/devTools/svgTester/diff-generator.ts +++ b/devTools/svgTester/diff-generator.ts @@ -78,11 +78,11 @@ async function main(parsedArgs: parseArgs.ParsedArgs) {
${id}
+ referenceCsv.get(id)!.svgFilename + }"/> + referenceCsv.get(id)!.svgFilename + }"/>
`) diff --git a/devTools/svgTester/diff-template.html b/devTools/svgTester/diff-template.html index 92d0356fee3..da9e8142b5b 100644 --- a/devTools/svgTester/diff-template.html +++ b/devTools/svgTester/diff-template.html @@ -1,4 +1,4 @@ - + SVG Comparison page diff --git a/devTools/svgTester/utils.ts b/devTools/svgTester/utils.ts index 98b7d884851..7d657a7d256 100644 --- a/devTools/svgTester/utils.ts +++ b/devTools/svgTester/utils.ts @@ -352,9 +352,8 @@ export async function loadGrapherConfigAndData( return { data, metadata } }) - const data: OwidVariableDataMetadataDimensions[] = await Promise.all( - loadDataPromises - ) + const data: OwidVariableDataMetadataDimensions[] = + await Promise.all(loadDataPromises) const variableData = new Map(data.map((d) => [d.metadata.id, d])) diff --git a/devTools/svgTester/verify-graphs.ts b/devTools/svgTester/verify-graphs.ts index 6ef810c9cce..ba0788a51ab 100644 --- a/devTools/svgTester/verify-graphs.ts +++ b/devTools/svgTester/verify-graphs.ts @@ -29,9 +29,8 @@ async function main(parsedArgs: parseArgs.ParsedArgs) { rawGrapherIds, inDir ) - const csvContentMap = await utils.getReferenceCsvContentMap( - referenceDir - ) + const csvContentMap = + await utils.getReferenceCsvContentMap(referenceDir) const verifyJobs = directoriesToProcess.map((dir) => ({ dir, diff --git a/explorerAdminClient/ExplorerCommands.ts b/explorerAdminClient/ExplorerCommands.ts index df42b9c4341..fe7ead21fba 100644 --- a/explorerAdminClient/ExplorerCommands.ts +++ b/explorerAdminClient/ExplorerCommands.ts @@ -76,7 +76,7 @@ export class SelectAllHitsCommand extends HotCommand { number, number, number, - number + number, ] ) ) diff --git a/package.json b/package.json index 414542c7c23..2e5b86969cb 100644 --- a/package.json +++ b/package.json @@ -170,7 +170,7 @@ "p-map": "^4.0.0", "papaparse": "^5.3.1", "parsimmon": "^1.18.1", - "prettier": "^2.8.7", + "prettier": "^3.0.3", "progress": "^2.0.3", "prompts": "^2.4.0", "prop-types": "^15.7.2", @@ -228,7 +228,6 @@ "@types/jest": "^29.5.5", "@types/js-yaml": "^4.0.5", "@types/opener": "^1.4.0", - "@types/prettier": "^2.7.3", "@types/topojson-server": "^3.0.1", "@typescript-eslint/eslint-plugin": "^6.0.0", "@typescript-eslint/parser": "^6.0.0", @@ -255,6 +254,7 @@ "react-codemirror2@^7.2.1": "patch:react-codemirror2@npm%3A7.2.1#./.yarn/patches/react-codemirror2-npm-7.2.1-dcadbb9383.patch" }, "prettier": { + "trailingComma": "es5", "semi": false }, "browserslist": [ diff --git a/packages/@ourworldindata/core-table/src/CoreTable.ts b/packages/@ourworldindata/core-table/src/CoreTable.ts index 4646ccb0b61..5e2e51b43d4 100644 --- a/packages/@ourworldindata/core-table/src/CoreTable.ts +++ b/packages/@ourworldindata/core-table/src/CoreTable.ts @@ -81,7 +81,7 @@ interface AdvancedOptions { // narrow interface for the input rows. This is helpful for OwidTable. export class CoreTable< ROW_TYPE extends CoreRow = CoreRow, - COL_DEF_TYPE extends CoreColumnDef = CoreColumnDef + COL_DEF_TYPE extends CoreColumnDef = CoreColumnDef, > { private _columns: Map = new Map() protected parent?: this diff --git a/packages/@ourworldindata/core-table/src/CoreTableColumns.ts b/packages/@ourworldindata/core-table/src/CoreTableColumns.ts index 74d2f38bd61..87fa17cf7ed 100644 --- a/packages/@ourworldindata/core-table/src/CoreTableColumns.ts +++ b/packages/@ourworldindata/core-table/src/CoreTableColumns.ts @@ -544,7 +544,7 @@ class BooleanColumn extends AbstractCoreColumn { } abstract class AbstractColumnWithNumberFormatting< - T extends PrimitiveType + T extends PrimitiveType, > extends AbstractCoreColumn { jsType = JsTypes.number diff --git a/packages/@ourworldindata/core-table/src/CoreTableUtils.ts b/packages/@ourworldindata/core-table/src/CoreTableUtils.ts index 9bfe779abb1..9febe1b4625 100644 --- a/packages/@ourworldindata/core-table/src/CoreTableUtils.ts +++ b/packages/@ourworldindata/core-table/src/CoreTableUtils.ts @@ -338,7 +338,7 @@ export function toleranceInterpolation( export function interpolateRowValuesWithTolerance< ValueSlug extends ColumnSlug, TimeSlug extends ColumnSlug, - Row extends { [key in TimeSlug]?: Time } & { [key in ValueSlug]?: any } + Row extends { [key in TimeSlug]?: Time } & { [key in ValueSlug]?: any }, >( rowsSortedByTimeAsc: Row[], valueSlug: ValueSlug, diff --git a/packages/@ourworldindata/grapher/src/color/ColorUtils.ts b/packages/@ourworldindata/grapher/src/color/ColorUtils.ts index 2041b0fc34e..e7f60927423 100644 --- a/packages/@ourworldindata/grapher/src/color/ColorUtils.ts +++ b/packages/@ourworldindata/grapher/src/color/ColorUtils.ts @@ -40,7 +40,7 @@ export function getLeastUsedColor( ) const mostUnusedColor = minBy(colorCounts, ([, count]) => count) as [ string, - number + number, ] return mostUnusedColor[0] } diff --git a/packages/@ourworldindata/grapher/src/controls/CommandPalette.scss b/packages/@ourworldindata/grapher/src/controls/CommandPalette.scss index c585deba3e8..f452ec9b069 100644 --- a/packages/@ourworldindata/grapher/src/controls/CommandPalette.scss +++ b/packages/@ourworldindata/grapher/src/controls/CommandPalette.scss @@ -10,7 +10,8 @@ $linkColor: #0645ad; opacity: 0.95; padding: 14px; border-radius: 2px; - box-shadow: rgba(0, 0, 0, 0.1) 0px 0px 2px 0px, + box-shadow: + rgba(0, 0, 0, 0.1) 0px 0px 2px 0px, rgba(0, 0, 0, 0.25) 0px 2px 2px 0px; .paletteTitle { diff --git a/packages/@ourworldindata/grapher/src/controls/entityPicker/EntityPicker.scss b/packages/@ourworldindata/grapher/src/controls/entityPicker/EntityPicker.scss index 5f7755456e9..d9a4aab91a9 100644 --- a/packages/@ourworldindata/grapher/src/controls/entityPicker/EntityPicker.scss +++ b/packages/@ourworldindata/grapher/src/controls/entityPicker/EntityPicker.scss @@ -1,6 +1,7 @@ $chart-border-radius: 2px; // Match chart styles -$chart-box-shadow: rgba(0, 0, 0, 0.1) 0px 0px 2px 0px, +$chart-box-shadow: + rgba(0, 0, 0, 0.1) 0px 0px 2px 0px, rgba(0, 0, 0, 0.25) 0px 2px 2px 0px; $zindex-dropdown: 100; diff --git a/packages/@ourworldindata/grapher/src/controls/globalEntitySelector/GlobalEntitySelector.scss b/packages/@ourworldindata/grapher/src/controls/globalEntitySelector/GlobalEntitySelector.scss index 04072960947..b3095855868 100644 --- a/packages/@ourworldindata/grapher/src/controls/globalEntitySelector/GlobalEntitySelector.scss +++ b/packages/@ourworldindata/grapher/src/controls/globalEntitySelector/GlobalEntitySelector.scss @@ -13,7 +13,9 @@ padding: 0.65em; border-radius: 8px; background-color: #fff; - box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1), 0 8px 15px rgba(0, 0, 0, 0.08), + box-shadow: + 0 15px 40px rgba(0, 0, 0, 0.1), + 0 8px 15px rgba(0, 0, 0, 0.08), 0 1px 3px 1px rgba(0, 0, 0, 0.08); display: flex; diff --git a/packages/@ourworldindata/grapher/src/core/LegacyToOwidTable.ts b/packages/@ourworldindata/grapher/src/core/LegacyToOwidTable.ts index 7b5a436040e..8c17ba8b8eb 100644 --- a/packages/@ourworldindata/grapher/src/core/LegacyToOwidTable.ts +++ b/packages/@ourworldindata/grapher/src/core/LegacyToOwidTable.ts @@ -417,7 +417,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)) diff --git a/packages/@ourworldindata/grapher/src/core/grapher.scss b/packages/@ourworldindata/grapher/src/core/grapher.scss index 9b221d43580..ff065d87c93 100644 --- a/packages/@ourworldindata/grapher/src/core/grapher.scss +++ b/packages/@ourworldindata/grapher/src/core/grapher.scss @@ -26,7 +26,8 @@ $blue-90: #1d3d63; $controls-color: #0073e6; $gray-10: #f7f7f7; $gray-10: #fafbfd; -$light-shadow: rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, +$light-shadow: + rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.08) 0px 2px 2px; $oxford-blue: #002147; $text-color: #1d3d63; diff --git a/packages/@ourworldindata/grapher/src/facetChart/FacetChart.tsx b/packages/@ourworldindata/grapher/src/facetChart/FacetChart.tsx index b693690bcb4..afe21b27b6b 100644 --- a/packages/@ourworldindata/grapher/src/facetChart/FacetChart.tsx +++ b/packages/@ourworldindata/grapher/src/facetChart/FacetChart.tsx @@ -539,8 +539,11 @@ export class FacetChart } @computed private get isNumericLegend(): boolean { - return this.externalLegends.some((legend) => - legend.numericLegendData?.some((bin) => bin instanceof NumericBin) + return this.externalLegends.some( + (legend) => + legend.numericLegendData?.some( + (bin) => bin instanceof NumericBin + ) ) } @@ -582,7 +585,7 @@ export class FacetChart } private getExternalLegendProp< - Prop extends keyof HorizontalColorLegendManager + Prop extends keyof HorizontalColorLegendManager, >(prop: Prop): HorizontalColorLegendManager[Prop] | undefined { for (const externalLegend of this.externalLegends) { if (externalLegend[prop] !== undefined) { diff --git a/packages/@ourworldindata/grapher/src/footer/Footer.tsx b/packages/@ourworldindata/grapher/src/footer/Footer.tsx index bf5ffae8b66..0079671f5d4 100644 --- a/packages/@ourworldindata/grapher/src/footer/Footer.tsx +++ b/packages/@ourworldindata/grapher/src/footer/Footer.tsx @@ -66,7 +66,7 @@ interface FooterProps { @observer export class Footer< - Props extends FooterProps = FooterProps + Props extends FooterProps = FooterProps, > extends React.Component { verticalPadding = 4 diff --git a/packages/@ourworldindata/grapher/src/header/Header.tsx b/packages/@ourworldindata/grapher/src/header/Header.tsx index eeffa6b2967..6a848733d81 100644 --- a/packages/@ourworldindata/grapher/src/header/Header.tsx +++ b/packages/@ourworldindata/grapher/src/header/Header.tsx @@ -21,7 +21,7 @@ interface HeaderProps { @observer export class Header< - Props extends HeaderProps = HeaderProps + Props extends HeaderProps = HeaderProps, > extends React.Component { @computed protected get manager(): HeaderManager { return this.props.manager diff --git a/packages/@ourworldindata/grapher/src/modal/DownloadModal.scss b/packages/@ourworldindata/grapher/src/modal/DownloadModal.scss index 8346a7dbabe..46572a70f1e 100644 --- a/packages/@ourworldindata/grapher/src/modal/DownloadModal.scss +++ b/packages/@ourworldindata/grapher/src/modal/DownloadModal.scss @@ -45,7 +45,8 @@ .grouped-menu-icon img { display: block; - box-shadow: 0px 0px 0px 0px rgba(49, 37, 2, 0.03), + box-shadow: + 0px 0px 0px 0px rgba(49, 37, 2, 0.03), 0px 6px 13px 0px rgba(49, 37, 2, 0.03), 0px 93px 37px 0px rgba(49, 37, 2, 0.01), 0px 145px 41px 0px rgba(49, 37, 2, 0); diff --git a/packages/@ourworldindata/grapher/src/slopeCharts/SlopeChart.tsx b/packages/@ourworldindata/grapher/src/slopeCharts/SlopeChart.tsx index a169273e23c..6780f4c2f55 100644 --- a/packages/@ourworldindata/grapher/src/slopeCharts/SlopeChart.tsx +++ b/packages/@ourworldindata/grapher/src/slopeCharts/SlopeChart.tsx @@ -735,7 +735,7 @@ class LabelledSlopes .domain( extent(this.props.seriesArr.map((series) => series.size)) as [ number, - number + number, ] ) .range([1, 4]) diff --git a/packages/@ourworldindata/grapher/src/sparkBars/SparkBars.scss b/packages/@ourworldindata/grapher/src/sparkBars/SparkBars.scss index 401ff4ec54e..198726f7b11 100644 --- a/packages/@ourworldindata/grapher/src/sparkBars/SparkBars.scss +++ b/packages/@ourworldindata/grapher/src/sparkBars/SparkBars.scss @@ -27,9 +27,16 @@ bottom: 0; text-align: right; margin-right: 6px; - text-shadow: 0 0 3px $white, 0 0 3px $white, 0 0 3px $white, - 0 0 3px $white, 0 0 3px $white, 0 0 3px $white, 0 0 3px $white, - 0 0 3px $white, 0 0 3px $white; + text-shadow: + 0 0 3px $white, + 0 0 3px $white, + 0 0 3px $white, + 0 0 3px $white, + 0 0 3px $white, + 0 0 3px $white, + 0 0 3px $white, + 0 0 3px $white, + 0 0 3px $white; z-index: 1; } } diff --git a/packages/@ourworldindata/grapher/src/stackedCharts/StackedConstants.ts b/packages/@ourworldindata/grapher/src/stackedCharts/StackedConstants.ts index 588ac0919ec..ec58bca6d7c 100644 --- a/packages/@ourworldindata/grapher/src/stackedCharts/StackedConstants.ts +++ b/packages/@ourworldindata/grapher/src/stackedCharts/StackedConstants.ts @@ -24,13 +24,13 @@ export interface StackedSeries } export interface StackedPlacedSeries< - PositionType extends StackedPointPositionType + PositionType extends StackedPointPositionType, > extends StackedSeries { placedPoints: Array } export interface StackedRawSeries< - PositionType extends StackedPointPositionType + PositionType extends StackedPointPositionType, > { seriesName: SeriesName isProjection?: boolean diff --git a/packages/@ourworldindata/grapher/src/stackedCharts/StackedUtils.ts b/packages/@ourworldindata/grapher/src/stackedCharts/StackedUtils.ts index 769786eddcc..94bc576da11 100644 --- a/packages/@ourworldindata/grapher/src/stackedCharts/StackedUtils.ts +++ b/packages/@ourworldindata/grapher/src/stackedCharts/StackedUtils.ts @@ -37,7 +37,7 @@ export function withUniformSpacing(values: number[]): number[] { // Adds a Y = 0 value for each missing x value (where X is usually Time) export const withMissingValuesAsZeroes = < - PositionType extends StackedPointPositionType + PositionType extends StackedPointPositionType, >( seriesArr: readonly StackedSeries[], { enforceUniformSpacing = false }: { enforceUniformSpacing?: boolean } = {} diff --git a/packages/@ourworldindata/utils/src/AdminSessionTypes.ts b/packages/@ourworldindata/utils/src/AdminSessionTypes.ts index a3df2174edc..7b54fe4664f 100644 --- a/packages/@ourworldindata/utils/src/AdminSessionTypes.ts +++ b/packages/@ourworldindata/utils/src/AdminSessionTypes.ts @@ -31,7 +31,7 @@ export interface BulkChartEditResponseRow extends BulkGrapherConfigResponseRow { } export interface BulkGrapherConfigResponse< - T extends BulkGrapherConfigResponseRow + T extends BulkGrapherConfigResponseRow, > { numTotalRows: number rows: T[] diff --git a/packages/@ourworldindata/utils/src/MarkdownTextWrap/MarkdownTextWrap.tsx b/packages/@ourworldindata/utils/src/MarkdownTextWrap/MarkdownTextWrap.tsx index 9f8c2aae977..7b6e416e307 100644 --- a/packages/@ourworldindata/utils/src/MarkdownTextWrap/MarkdownTextWrap.tsx +++ b/packages/@ourworldindata/utils/src/MarkdownTextWrap/MarkdownTextWrap.tsx @@ -27,7 +27,10 @@ export interface IRToken { } export class IRText implements IRToken { - constructor(public text: string, public fontParams?: IRFontParams) {} + constructor( + public text: string, + public fontParams?: IRFontParams + ) {} @imemo get width(): number { return Bounds.forText(this.text, this.fontParams).width } @@ -90,7 +93,10 @@ export class IRLineBreak implements IRToken { } export abstract class IRElement implements IRToken { - constructor(public children: IRToken[], public fontParams?: IRFontParams) {} + constructor( + public children: IRToken[], + public fontParams?: IRFontParams + ) {} @imemo get width(): number { return getLineWidth(this.children) @@ -177,7 +183,10 @@ export class IRSpan extends IRElement { } export class IRSuperscript implements IRToken { - constructor(public text: string, public fontParams?: IRFontParams) {} + constructor( + public text: string, + public fontParams?: IRFontParams + ) {} @imemo get width(): number { return Bounds.forText(this.text, { fontSize: this.height / 2 }).width } diff --git a/packages/@ourworldindata/utils/src/SqlFilterSExpression.ts b/packages/@ourworldindata/utils/src/SqlFilterSExpression.ts index 19afb0742e2..ba6d0024d79 100644 --- a/packages/@ourworldindata/utils/src/SqlFilterSExpression.ts +++ b/packages/@ourworldindata/utils/src/SqlFilterSExpression.ts @@ -160,7 +160,10 @@ export class JsonPointerSymbol implements Operation { static isValidJsonPointer(str: string): boolean { return JsonPointerSymbol.jsonPointerRegex.test(str) } - constructor(public value: string, operationContext: OperationContext) { + constructor( + public value: string, + operationContext: OperationContext + ) { if (!JsonPointerSymbol.isValidJsonPointer(value)) throw Error(`Invalid Json Pointer: ${value} - did not match regex`) this.columnName = operationContext.grapherConfigFieldName @@ -195,7 +198,10 @@ export class SqlColumnName implements Operation { ): boolean { return operationContext.whitelistedColumnNamesAndTypes.has(str) } - constructor(public value: string, operationContext: OperationContext) { + constructor( + public value: string, + operationContext: OperationContext + ) { if (!SqlColumnName.isValidSqlColumnName(value, operationContext)) throw Error( `Invalid column name: ${value} - did not match the set of allowed columns` @@ -270,7 +276,10 @@ export const allNullCheckOperators = [ ] export class NullCheckOperation extends BooleanOperation { - constructor(public operator: NullCheckOperator, public operand: Operation) { + constructor( + public operator: NullCheckOperator, + public operand: Operation + ) { super() } diff --git a/public/identifyadmin.html b/public/identifyadmin.html index 898a3bc00d6..eeebf4b261f 100644 --- a/public/identifyadmin.html +++ b/public/identifyadmin.html @@ -1,4 +1,4 @@ - +