Skip to content

Commit f1bdfdd

Browse files
committed
chore: remove redundant BucketsList declaration
1 parent c1cbc87 commit f1bdfdd

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

src/scripts/crowdin/translations/getApprovedBuckets.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import i18n from "../../../../i18n.config.json"
22
import bucketDirs from "../../../data/crowdin/translation-buckets-dirs.json"
33
import { CROWDIN_API_MAX_LIMIT } from "../../../lib/constants"
44
import crowdin from "../api-client/crowdinClient"
5+
import type { BucketsList } from "../import/types"
56

67
import { APPROVAL_THRESHOLD } from "./constants"
7-
import type { BucketsList } from "./types"
88

99
async function getApprovedBuckets(): Promise<BucketsList> {
1010
const projectId = Number(process.env.CROWDIN_PROJECT_ID) || 363359

src/scripts/crowdin/translations/getTranslations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ import fs from "fs"
33
import { checkMarkdown } from "../../markdownChecker"
44
import crowdin from "../api-client/crowdinClient"
55
import crowdinImport from "../import/main"
6+
import type { BucketsList } from "../import/types"
67

78
import { BUCKETS_PATH, DOT_CROWDIN, FILE_PATH, SUMMARY_PATH } from "./constants"
89
import getApprovedBuckets from "./getApprovedBuckets"
9-
import type { BucketsList } from "./types"
1010
import { decompressFile, downloadFile } from "./utils"
1111

1212
import "dotenv/config"

src/scripts/crowdin/translations/postLangPRs.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import fs from "fs"
22

33
import i18n from "../../../../i18n.config.json"
4+
import { BucketsList } from "../import/types"
45

56
import { BUCKETS_PATH } from "./constants"
67
import { processLocale } from "./utils"
@@ -9,7 +10,7 @@ const locales = i18n.map((lang) => lang.code)
910

1011
function postLangPRs() {
1112
const bucketsListData = fs.readFileSync(BUCKETS_PATH, "utf-8")
12-
const bucketsList = JSON.parse(bucketsListData)
13+
const bucketsList: BucketsList = JSON.parse(bucketsListData)
1314
if (!bucketsList) throw new Error("Failed to read buckets list.")
1415

1516
for (const locale of locales) {

src/scripts/crowdin/translations/types.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,4 @@ export type DirectoryItem = {
44
updatedAt: string
55
}
66

7-
export type BucketsList = Record<string, number[]>
8-
97
export type QASummary = Record<string, string[]>

0 commit comments

Comments
 (0)