Skip to content

Commit

Permalink
Actually commit lint fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
plural committed Feb 8, 2024
1 parent 0a0c1ca commit c499dba
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/updateDuplicatePrintings.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// Given a v1 pack, update all other printings of cards in that pack to the
// values in the specified pack.
// Quiet a lint warning up since we know our data exists.
/* eslint-disable @typescript-eslint/no-non-null-assertion */

import fs from "fs";
import { resolve } from "path";
Expand Down Expand Up @@ -96,13 +98,12 @@ fs.readdirSync(packsDir).forEach(file => {

packsNeedingUpdates.forEach(p => {
console.log(`Need to update pack file ${p}`);
let v1 = new Array<any>();
const v1 = new Array<any>();
const json = JSON.parse(fs.readFileSync(resolve(p), 'utf-8'));
json.forEach(printing => {
json.forEach((printing: any) => {
if (cardIds.has(printingIdToCardId.get(printing.code)!)) {
console.log(`Need to update printing ${printing.code} (${printing.title})`);
// let newPrinting = deepCopy(printing);
let newCard = v2CardsById.get(printingIdToCardId.get(printing.code)!);
const newCard = v2CardsById.get(printingIdToCardId.get(printing.code)!);
printing.title = newCard.title;
printing.stripped_title = newCard.stripped_title;
printing.text = newCard.text;
Expand Down

0 comments on commit c499dba

Please sign in to comment.