Skip to content
Merged
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
3692def
Reconfigure eslint to work with prettier
FyreByrd May 12, 2026
2133301
Apply eslint auto-fixes.
judah-sotomayor Jul 10, 2025
fb57178
Add block scope to cases in src/lib/video/index.ts
judah-sotomayor Jul 10, 2025
4163231
Split bkk.chapters expectation into two tests.
judah-sotomayor Jul 10, 2025
5b36d0f
ESLint ignore require import in tailwind config.
judah-sotomayor Jul 10, 2025
0fe4bed
Create block scope around case in contents/[id]/+page.svelte.
judah-sotomayor Jul 10, 2025
10db5d2
Fix toBeDefined() function call in worker-messenger test.
judah-sotomayor Jul 10, 2025
9fbc89f
Fix toBeDefined() call in search data test.
judah-sotomayor Jul 10, 2025
fcce26c
Make results const in searchDictionary.
judah-sotomayor Jul 10, 2025
11ba4f0
Replace calls to hasOwnProperty.
judah-sotomayor Jul 10, 2025
7d32f15
Satisfy ESLint with comment in lib/data/scripture.js.
judah-sotomayor Jul 10, 2025
98741d7
Remove empty object types from CatalogData.
judah-sotomayor Jul 10, 2025
b2bff34
Change sourceMp3 to a const in lib/data/audio.ts.
judah-sotomayor Jul 10, 2025
19d72a2
Add block around darwin case in example/index.js.
judah-sotomayor Jul 10, 2025
9ca0dcb
Add block around case in BottomNavigationBar.
judah-sotomayor Jul 10, 2025
846b4cc
Replace ugly one-line comparision in Sidebar.
judah-sotomayor Jul 10, 2025
38968f4
Disable `svelte/no-dupe-style-properties` as it is very noisy.
judah-sotomayor Jul 10, 2025
f0cd7fc
Disable eslint each-block warnings.
judah-sotomayor Jul 10, 2025
1fbd246
Fix useless moustaches.
judah-sotomayor Jul 10, 2025
c0baf0c
Disable svelte/no-unused-svelte-ignore eslint rule.
judah-sotomayor Jul 10, 2025
cb64f58
Silence spurious goto warnings.
judah-sotomayor Jul 10, 2025
4c24573
Fix font-family misspelling in FontList.svelte.
judah-sotomayor Jul 10, 2025
626b5d4
Apply prettier changes.
judah-sotomayor Jul 10, 2025
c18fcd1
Add `curly` rule to eslint, fix errors.
judah-sotomayor Jul 11, 2025
cb7073d
Disable eslint for @html in about page.
judah-sotomayor Jul 12, 2025
56830fb
Ignore/resolve remaining eslint errors.
judah-sotomayor Jul 22, 2025
659779f
Ignore extracted CI projects folder
FyreByrd May 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 0 additions & 41 deletions .eslintrc.cjs

This file was deleted.

8 changes: 6 additions & 2 deletions convert/convertAbout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,12 @@ export function convertAbout(dataDir: string, verbose: number) {
const srcFile = path.join(dataDir, 'about.partial.html');
const dstFile = path.join('src/gen-assets', 'about.partial.html');
copyFile(srcFile, dstFile, function (err: any) {
if (err) throw err;
if (verbose) console.log(`copied ${srcFile} to ${dstFile}`);
if (err) {
throw err;
}
if (verbose) {
console.log(`copied ${srcFile} to ${dstFile}`);
}
});
Comment thread
FyreByrd marked this conversation as resolved.
}
export class ConvertAbout extends Task {
Expand Down
8 changes: 6 additions & 2 deletions convert/convertBadges.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,12 @@ export async function convertBadges(
if (existsSync(srcFile)) {
foundLanguages.push(language);
copyFile(srcFile, dstFile, function (err: any) {
if (err) throw err;
if (verbose) console.log(`copied ${srcFile} to ${dstFile}`);
if (err) {
throw err;
}
if (verbose) {
console.log(`copied ${srcFile} to ${dstFile}`);
}
});
Comment thread
FyreByrd marked this conversation as resolved.
}
}
Expand Down
49 changes: 35 additions & 14 deletions convert/convertBooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ function handleNoCaptionFigures(
const parts = figContent.split('|');

// Extract the image caption
let imageCaption = parts[0];
const imageCaption = parts[0];

// Check if the image caption is missing
if (!imageCaption) {
Expand Down Expand Up @@ -302,7 +302,7 @@ function moveFigureToNextNonVerseMarker(
const eol = text.includes('\r\n') ? '\r\n' : '\n';

const lines = text.split(/\r?\n/);
for (let line of lines) {
for (const line of lines) {
// Add any figures that were carried over from the previous lines
if (carryOverFigures.length > 0) {
if (!line.startsWith('\\v ') && !line.startsWith('\\fig')) {
Expand Down Expand Up @@ -445,10 +445,11 @@ export async function convertBooks(
);
}
usedLangs.add(context.lang);
if (verbose)
if (verbose) {
console.log(
'converting collection: ' + collection.id + ' to docSet: ' + context.docSet
);
}
/**array of promises of Proskomma mutations*/
const inputFiles = await fs.promises.readdir(
path.join(context.dataDir, 'books', context.bcId)
Expand Down Expand Up @@ -503,7 +504,7 @@ export async function convertBooks(
convertScriptureBook(pk, context, book, bcGlossary, docs, inputFiles);
}
if (book.bookTabs) {
for (const bookTab of book.bookTabs?.tabs) {
for (const bookTab of book.bookTabs.tabs) {
convertScriptureBook(
pk,
context,
Expand All @@ -523,14 +524,18 @@ export async function convertBooks(
continue;
}
}
if (verbose) console.time('convert ' + collection.id);
if (verbose) {
console.time('convert ' + collection.id);
}
//wait for documents to finish being added to Proskomma
await Promise.all(docs);
if (ignoredBooks.length > 0) {
process.stdout.write(` -- Not Supported: ${ignoredBooks.join(' ')}`);
}
process.stdout.write('\n');
if (verbose) console.timeEnd('convert ' + collection.id);
if (verbose) {
console.timeEnd('convert ' + collection.id);
}
//start freezing process and map promise to docSet name

const frozen = freeze(pk);
Expand All @@ -556,7 +561,9 @@ export async function convertBooks(
JSON.stringify(transformCatalogEntry(entry, quizzes, htmlBooks))
);
});
if (verbose) console.time('freeze');
if (verbose) {
console.time('freeze');
}
//write frozen archives for import
//const vals = await Promise.all(freezer.values());
//write frozen archives
Expand All @@ -583,7 +590,9 @@ export async function convertBooks(
return s;
})()}]`
);
if (verbose) console.timeEnd('freeze');
if (verbose) {
console.timeEnd('freeze');
}
return {
files,
taskName: 'ConvertBooks'
Expand Down Expand Up @@ -789,7 +798,9 @@ function convertScriptureBook(
const id = bookTab ? book.id + bookTab.bookTabID : book.id; //Book tab ID is derived from the book ID because book tabs don't have distinct IDs.
function processBookContent(resolve: () => void, err: any, content: string) {
//process.stdout.write(`processBookContent: bookId:${book.id}, error:${err}\n`);
if (err) throw err;
if (err) {
throw err;
}
Comment thread
FyreByrd marked this conversation as resolved.
content = applyFilters(content, usfmFilterFunctions, context.bcId, id, context);
if (bookTab) {
//The book tab ID in the sfm file gets cut off, which results in it having the same ID as the book. Generate a new ID based on the book ID and book tab ID.
Expand Down Expand Up @@ -860,7 +871,9 @@ function convertScriptureBook(
const filenameWithoutExt = basename(file, ext).normalize('NFC');

// Check if the filename starts with baseFilename
if (!filenameWithoutExt.startsWith(baseFilename)) return false;
if (!filenameWithoutExt.startsWith(baseFilename)) {
return false;
}

// Get the part after baseFilename
const suffix = filenameWithoutExt.slice(baseFilename.length);
Expand Down Expand Up @@ -933,17 +946,25 @@ export class ConvertBooks extends Task {
* recursively deep-compares two objects based on properties passed in include.
*/
function deepCompareObjects(obj1: any, obj2: any, include: Set<string> = new Set()): boolean {
if (typeof obj1 !== typeof obj2) return false;
if (typeof obj1 !== typeof obj2) {
return false;
}
if (typeof obj1 === 'object') {
if (Array.isArray(obj1)) {
if (obj1.length !== obj2.length) return false;
if (obj1.length !== obj2.length) {
return false;
}
for (let i = 0; i < obj1.length; i++) {
if (!deepCompareObjects(obj1[i], obj2[i])) return false;
if (!deepCompareObjects(obj1[i], obj2[i])) {
return false;
}
}
} else {
for (const k in obj1) {
if (include.has(k)) {
if (!deepCompareObjects(obj1[k], obj2[k])) return false;
if (!deepCompareObjects(obj1[k], obj2[k])) {
return false;
}
}
}
}
Expand Down
Loading
Loading