From 7876f66d2bda4102b7336c5f937b26091657e671 Mon Sep 17 00:00:00 2001 From: Steve Cassidy Date: Mon, 6 Nov 2023 21:57:20 +1100 Subject: [PATCH] lint fixes Signed-off-by: Steve Cassidy --- cspell.json | 17 +++++++++++------ src/data_storage/index.ts | 5 +---- src/datamodel/core.ts | 2 +- src/index.ts | 2 +- src/logging.ts | 4 ++-- tests/attachments.test.ts | 2 +- 6 files changed, 17 insertions(+), 15 deletions(-) diff --git a/cspell.json b/cspell.json index fbe0023..cac5f8c 100644 --- a/cspell.json +++ b/cspell.json @@ -5,14 +5,19 @@ "language": "en-GB", // words - list of words to be always considered correct "words": [ + "automerge", + "avps", + "datamodel", "FAIMS", + "FAIMSEVENTTYPE", + "frev", + "fviews", + "HRID", "Macquarie", - "datamodel", + "pubalg", + "uidesign", "uuidv4", - "HRID", - "frev", - "avps", - "vocab", - "automerge" + "viewsets", + "vocab" ] } diff --git a/src/data_storage/index.ts b/src/data_storage/index.ts index 4350934..2b3b868 100644 --- a/src/data_storage/index.ts +++ b/src/data_storage/index.ts @@ -40,8 +40,6 @@ import { RevisionID, ProjectRevisionListing, RecordRevisionListing, - RecordMetadataList, - AttributeValuePair, } from '../types'; import {shouldDisplayRecord} from '../index'; import { @@ -54,7 +52,6 @@ import { updateHeads, getHRID, listRecordMetadata, - getAllRecords, } from './internals'; import {getAllRecordsOfType, getAllRecordsWithRegex} from './queries'; import {logError} from '../logging'; @@ -553,7 +550,7 @@ export const notebookRecordIterator = async ( // deal with no records if (records.length === 0) { return {next: async () => ({record: null, done: true})}; - }; + } let index = 0; const recordIterator = { diff --git a/src/datamodel/core.ts b/src/datamodel/core.ts index 7a80468..1744472 100644 --- a/src/datamodel/core.ts +++ b/src/datamodel/core.ts @@ -89,4 +89,4 @@ export function split_full_record_id( project_id: cleaned_project_id, record_id: splitId[1], }; -} \ No newline at end of file +} diff --git a/src/index.ts b/src/index.ts index 8f44f50..f46b9b3 100644 --- a/src/index.ts +++ b/src/index.ts @@ -85,7 +85,7 @@ export { mergeHeads, resolve_project_id, saveUserMergeResult, - setRecordAsDeleted, + setRecordAsDeleted, split_full_project_id, upsertFAIMSData, setAttachmentLoaderForType, diff --git a/src/logging.ts b/src/logging.ts index 8dac82a..0d4763a 100644 --- a/src/logging.ts +++ b/src/logging.ts @@ -18,9 +18,9 @@ * Wrappers for logging functions for errors etc. */ -// TODO: removed bugsnag from here but the frontend will want to +// TODO: removed bugsnag from here but the frontend will want to // report errors that way - need to pass in an error logger? export const logError = (error: any) => { - console.error(error); + console.error(error); }; diff --git a/tests/attachments.test.ts b/tests/attachments.test.ts index 8130e52..369e417 100644 --- a/tests/attachments.test.ts +++ b/tests/attachments.test.ts @@ -61,7 +61,7 @@ describe('attachments', () => { 'Some Text Data' ); } - }; + } }); });