Skip to content

Commit

Permalink
🐝 fix linter issues
Browse files Browse the repository at this point in the history
  • Loading branch information
danyx23 committed Mar 12, 2024
1 parent a361815 commit e23956e
Show file tree
Hide file tree
Showing 12 changed files with 7 additions and 50 deletions.
1 change: 0 additions & 1 deletion adminSiteClient/gdocsDeploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
OwidGdocDataInsightContent,
OwidGdocType,
OwidGdocHomepageContent,
DbRawPostGdoc,
DbEnrichedPostGdoc,
} from "@ourworldindata/types"
import { GDOC_DIFF_OMITTABLE_PROPERTIES } from "./GdocsDiff.js"
Expand Down
1 change: 0 additions & 1 deletion adminSiteServer/authentication.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {
import { BCryptHasher } from "../db/hashers.js"
import { Secret, verify } from "jsonwebtoken"
import { DbPlainSession, DbPlainUser, JsonError } from "@ourworldindata/utils"
import { getUserByEmail } from "../db/model/User.js"

export type Request = express.Request

Expand Down
1 change: 0 additions & 1 deletion baker/GDriveImagesBaker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {

import {
DbRawImage,
ImageMetadata,
getFilenameAsPng,
parseImageRow,
retryPromise,
Expand Down
1 change: 0 additions & 1 deletion baker/GrapherBaker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ import { Image, getAllImages } from "../db/model/Image.js"
import { logErrorAndMaybeSendToBugsnag } from "../serverUtils/errorLog.js"

import { parseFaqs } from "../db/model/Gdoc/rawToEnriched.js"
import { GdocPost } from "../db/model/Gdoc/GdocPost.js"
import { getShortPageCitation } from "../site/gdocs/utils.js"
import { getSlugForTopicTag, getTagToSlugMap } from "./GrapherBakingUtils.js"
import { knexRaw } from "../db/db.js"
Expand Down
1 change: 0 additions & 1 deletion datapage/Datapage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
getNextUpdateFromVariable,
omitUndefinedValues,
} from "@ourworldindata/utils"
import { GdocPost } from "../db/model/Gdoc/GdocPost.js"
import {
getAndLoadGdocById,
getGdocBaseObjectById,
Expand Down
14 changes: 0 additions & 14 deletions db/model/Gdoc/GdocBase.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,9 @@
import {
Entity,
Column,
BaseEntity,
UpdateDateColumn,
PrimaryColumn,
BeforeUpdate,
BeforeInsert,
ManyToMany,
JoinTable,
} from "typeorm"
import * as db from "../../db"
import { getUrlTarget } from "@ourworldindata/components"
import {
LinkedChart,
LinkedIndicator,
keyBy,
excludeNull,
ImageMetadata,
excludeUndefined,
OwidGdocErrorMessage,
Expand Down Expand Up @@ -67,10 +55,8 @@ import {
import { createLinkFromUrl } from "../Link.js"
import {
DbEnrichedPostGdoc,
DbRawPostGdoc,
OwidGdocContent,
OwidGdocType,
serializePostsGdocsRow,
} from "@ourworldindata/types"
import { KnexReadonlyTransaction } from "../../db"

Expand Down
3 changes: 0 additions & 3 deletions db/model/Gdoc/GdocDataInsight.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
import { Entity, Column, LessThanOrEqual, Raw } from "typeorm"
import {
OwidGdocErrorMessage,
OwidGdocErrorMessageType,
OwidGdocDataInsightContent,
OwidGdocDataInsightInterface,
MinimalDataInsightInterface,
OwidGdocType,
DATA_INSIGHTS_INDEX_PAGE_SIZE,
OwidGdocMinimalPostInterface,
OwidGdocBaseInterface,
excludeNullish,
Expand Down
22 changes: 6 additions & 16 deletions db/model/Gdoc/GdocFaq.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,10 @@
import { Entity, Column } from "typeorm"
import {
OwidGdocErrorMessage,
OwidGdocErrorMessageType,
OwidEnrichedGdocBlock,
FaqDictionary,
ParseError,
OwidGdocBaseInterface,
} from "@ourworldindata/utils"
import { parseFaqs } from "./rawToEnriched.js"
import { GdocBase } from "./GdocBase.js"
// import { FaqDictionary, ParseError } from "@ourworldindata/utils"

interface InterfaceGdocFaq {
parsedFaqs: FaqDictionary
parseErrors: ParseError[]
faqs: unknown // unparsed
}
// interface InterfaceGdocFaq {
// parsedFaqs: FaqDictionary
// parseErrors: ParseError[]
// faqs: unknown // unparsed
// }

/**
* This is an unused mock prototype, I think *something* like this could work,
Expand Down
6 changes: 1 addition & 5 deletions db/model/Gdoc/GdocPost.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { LessThanOrEqual } from "typeorm"
import {
type OwidGdocPostContent,
OwidGdocPostInterface,
OwidGdocPublicationContext,
OwidGdocErrorMessage,
OwidGdocErrorMessageType,
DetailDictionary,
Expand All @@ -15,7 +13,6 @@ import {
OwidGdocBaseInterface,
excludeNullish,
} from "@ourworldindata/utils"
import { OwidGdocContent } from "@ourworldindata/types"
import { GDOCS_DETAILS_ON_DEMAND_ID } from "../../../settings/serverSettings.js"
import {
formatCitation,
Expand All @@ -26,8 +23,7 @@ import { ADMIN_BASE_URL } from "../../../settings/clientSettings.js"
import { parseDetails, parseFaqs } from "./rawToEnriched.js"
import { htmlToEnrichedTextBlock } from "./htmlToEnriched.js"
import { GdocBase } from "./GdocBase.js"
import { KnexReadonlyTransaction, getConnection, knexRaw } from "../../db.js"
import { number, string } from "prop-types"
import { KnexReadonlyTransaction, knexRaw } from "../../db.js"
import {
getGdocBaseObjectById,
getAndLoadListedGdocPosts,
Expand Down
4 changes: 0 additions & 4 deletions db/model/Gdoc/gdocUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ import {
Span,
excludeNullish,
EnrichedBlockResearchAndWritingLink,
OwidGdocMinimalPostInterface,
OwidGdocType,
formatDate,
OwidGdocBaseInterface,
DATA_INSIGHTS_INDEX_PAGE_SIZE,
} from "@ourworldindata/utils"
import { match, P } from "ts-pattern"
Expand Down
1 change: 0 additions & 1 deletion db/model/Source.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { Entity, PrimaryGeneratedColumn, Column, BaseEntity } from "typeorm"
import {
DbEnrichedSource,
DbRawSource,
Expand Down
2 changes: 0 additions & 2 deletions db/model/Variable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ import {
OwidVariableId,
ChartTypeName,
DimensionProperty,
OwidLicense,
GrapherInterface,
OwidProcessingLevel,
DbRawVariable,
} from "@ourworldindata/types"
import { knexRaw, knexRawFirst } from "../db.js"
Expand Down

0 comments on commit e23956e

Please sign in to comment.