style: auto-fix ESLint issues (curly braces and formatting)
- Add curly braces to all if/else/for/while statements - Fix indentation and trailing spaces - Auto-fixed 372 linting errors using eslint --fix - Remaining issues are warnings only (non-null assertions, explicit any types)
This commit is contained in:
@@ -52,7 +52,7 @@ export function cosineSimilarity(a: number[] | Float32Array, b: number[] | Float
|
||||
}
|
||||
|
||||
const magnitude = Math.sqrt(normA) * Math.sqrt(normB);
|
||||
if (magnitude === 0) return 0;
|
||||
if (magnitude === 0) {return 0;}
|
||||
|
||||
return dotProduct / magnitude;
|
||||
}
|
||||
@@ -129,7 +129,7 @@ export class VectorStore {
|
||||
throw new Error(`Chunks/embeddings length mismatch: ${chunks.length} vs ${embeddings.length}`);
|
||||
}
|
||||
|
||||
if (chunks.length === 0) return;
|
||||
if (chunks.length === 0) {return;}
|
||||
|
||||
const namespace = chunks[0].namespace;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user