Skip to content

Commit 2313c90

Browse files
lint issues
1 parent 224f35e commit 2313c90

File tree

2 files changed

+5
-13
lines changed

2 files changed

+5
-13
lines changed

frontend/src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ export interface GraphViewModalProps {
249249
viewPoint: string;
250250
nodeValues?: Node[];
251251
relationshipValues?: Relationship[];
252-
selectedRows: CustomFile[] | undefined;
252+
selectedRows?: CustomFile[] | undefined;
253253
}
254254

255255
export type GraphType = 'Document' | 'Entities' | 'Chunk';

frontend/src/utils/Utils.ts

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,7 @@ export const filterData = (
186186
const entityNode = allNodes.filter((node) => !node.labels.includes('Document') && !node.labels.includes('Chunk'));
187187
filteredNodes = entityNode ? entityNode : [];
188188
// @ts-ignore
189-
filteredRelations = allRelationships.filter(
190-
(rel) => !['PART_OF', 'FIRST_CHUNK', 'HAS_ENTITY', 'SIMILAR', 'NEXT_CHUNK'].includes(rel.caption)
191-
);
189+
filteredRelations = allRelationships.filter((rel) => !['PART_OF', 'FIRST_CHUNK', 'HAS_ENTITY', 'SIMILAR', 'NEXT_CHUNK'].includes(rel.caption));
192190
filteredScheme = Object.fromEntries(entityTypes.map((key) => [key, scheme[key]])) as Scheme;
193191
} else if (!graphType.includes('Document') && !graphType.includes('Entities') && graphType.includes('Chunk')) {
194192
// Only Chunk
@@ -200,22 +198,16 @@ export const filterData = (
200198
} else if (graphType.includes('Document') && graphType.includes('Entities') && !graphType.includes('Chunk')) {
201199
// Document + Entity
202200
// @ts-ignore
203-
filteredNodes = allNodes.filter(
204-
(node) =>
205-
node.labels.includes('Document') || (!node.labels.includes('Document') && !node.labels.includes('Chunk'))
201+
filteredNodes = allNodes.filter((node) =>node.labels.includes('Document') || (!node.labels.includes('Document') && !node.labels.includes('Chunk'))
206202
);
207203
// @ts-ignore
208-
filteredRelations = allRelationships.filter(
209-
(rel) => !['PART_OF', 'FIRST_CHUNK', 'HAS_ENTITY', 'SIMILAR', 'NEXT_CHUNK'].includes(rel.caption)
210-
);
204+
filteredRelations = allRelationships.filter((rel) => !['PART_OF', 'FIRST_CHUNK', 'HAS_ENTITY', 'SIMILAR', 'NEXT_CHUNK'].includes(rel.caption));
211205
} else if (graphType.includes('Document') && !graphType.includes('Entities') && graphType.includes('Chunk')) {
212206
// Document + Chunk
213207
// @ts-ignore
214208
filteredNodes = allNodes.filter((node) => node.labels.includes('Document') || node.labels.includes('Chunk'));
215209
// @ts-ignore
216-
filteredRelations = allRelationships.filter((rel) =>
217-
['PART_OF', 'FIRST_CHUNK', 'SIMILAR', 'NEXT_CHUNK'].includes(rel.caption)
218-
);
210+
filteredRelations = allRelationships.filter((rel) =>['PART_OF', 'FIRST_CHUNK', 'SIMILAR', 'NEXT_CHUNK'].includes(rel.caption));
219211
filteredScheme = { Document: scheme.Document, Chunk: scheme.Chunk };
220212
} else if (!graphType.includes('Document') && graphType.includes('Entities') && graphType.includes('Chunk')) {
221213
// Chunk + Entity

0 commit comments

Comments
 (0)