Skip to content

Commit e52e17a

Browse files
committed
lint
1 parent f1aa1c1 commit e52e17a

4 files changed

Lines changed: 14 additions & 6 deletions

File tree

biome.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"$schema": "https://biomejs.dev/schemas/2.1.3/schema.json",
33
"vcs": {
4-
"enabled": false,
4+
"enabled": true,
55
"clientKind": "git",
6-
"useIgnoreFile": false
6+
"useIgnoreFile": true
77
},
88
"files": {
99
"ignoreUnknown": false

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "chunkdown",
33
"version": "1.0.1-rc.0",
44
"description": "A tree-based markdown text splitter designed for optimal chunking with an embedding-first approach",
5+
"packageManager": "pnpm@9.0.0",
56
"type": "module",
67
"types": "./src/index.ts",
78
"exports": {

www/src/components/ASTVisualizer.tsx

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,23 @@ function TreeNode({
102102
} else if (node.type === 'table' && 'children' in node && node.children) {
103103
const rows = node.children.length;
104104
const firstRow = node.children[0];
105-
const cols = (firstRow && 'children' in firstRow && firstRow.children) ? firstRow.children.length : 0;
105+
const cols =
106+
firstRow && 'children' in firstRow && firstRow.children
107+
? firstRow.children.length
108+
: 0;
106109
label += ` (${rows}×${cols})`;
107-
} else if (node.type === 'tableRow' && 'children' in node && node.children) {
110+
} else if (
111+
node.type === 'tableRow' &&
112+
'children' in node &&
113+
node.children
114+
) {
108115
label += ` (${node.children.length} cells)`;
109116
} else {
110117
// For any unknown node types, try to add useful info if available
111118
if ('value' in node && typeof node.value === 'string') {
112119
const text = node.value;
113-
const truncated = text.length > 30 ? text.substring(0, 30) + '...' : text;
120+
const truncated =
121+
text.length > 30 ? text.substring(0, 30) + '...' : text;
114122
label += `: "${truncated}"`;
115123
} else if ('url' in node && typeof node.url === 'string') {
116124
label += `: ${node.url}`;

www/src/components/ChunkVisualizer.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,6 @@ function ChunkVisualizer({
290290

291291
return (
292292
<div className="w-full">
293-
294293
{/* Stats */}
295294
<div className="p-3 bg-gray-50 rounded-lg mb-4">
296295
<h4 className="text-sm font-medium text-black mb-3">Statistics</h4>

0 commit comments

Comments
 (0)