aboutsummaryrefslogtreecommitdiff
path: root/ext/js/data/anki-note-builder.js
diff options
context:
space:
mode:
authorJames Maa <jmaa@berkeley.edu>2024-05-31 08:06:52 -0700
committerGitHub <noreply@github.com>2024-05-31 15:06:52 +0000
commit76ca08bd59f0e8bfa1bb20ac813f48e7ab241265 (patch)
treebdba43d9ba704885383c7f308c6fe3f574c647c5 /ext/js/data/anki-note-builder.js
parentb3f54747eb2694bdc90bce72e5532e99d374ef08 (diff)
Allow trailing commas in ESLint (#1013)
* Update comma-dangle rule * Fix dangling commas
Diffstat (limited to 'ext/js/data/anki-note-builder.js')
-rw-r--r--ext/js/data/anki-note-builder.js18
1 files changed, 9 insertions, 9 deletions
diff --git a/ext/js/data/anki-note-builder.js b/ext/js/data/anki-note-builder.js
index aec8cdd9..f7d4a12a 100644
--- a/ext/js/data/anki-note-builder.js
+++ b/ext/js/data/anki-note-builder.js
@@ -59,7 +59,7 @@ export class AnkiNoteBuilder {
resultOutputMode = 'split',
glossaryLayoutMode = 'default',
compactTags = false,
- mediaOptions = null
+ mediaOptions = null,
}) {
let duplicateScopeDeckName = null;
let duplicateScopeCheckChildren = false;
@@ -116,9 +116,9 @@ export class AnkiNoteBuilder {
duplicateScopeOptions: {
deckName: duplicateScopeDeckName,
checkChildren: duplicateScopeCheckChildren,
- checkAllModels: duplicateScopeCheckAllModels
- }
- }
+ checkAllModels: duplicateScopeCheckAllModels,
+ },
+ },
};
return {note, errors: allErrors, requirements: [...uniqueRequirements.values()]};
}
@@ -134,7 +134,7 @@ export class AnkiNoteBuilder {
resultOutputMode = 'split',
glossaryLayoutMode = 'default',
compactTags = false,
- marker
+ marker,
}) {
const commonData = this._createData(dictionaryEntry, mode, context, resultOutputMode, glossaryLayoutMode, compactTags, void 0);
return await this._templateRenderer.getModifiedData({marker, commonData}, 'ankiNote');
@@ -191,7 +191,7 @@ export class AnkiNoteBuilder {
resultOutputMode,
glossaryLayoutMode,
compactTags,
- media
+ media,
};
}
@@ -314,7 +314,7 @@ export class AnkiNoteBuilder {
templateItems.push({
type: /** @type {import('anki-templates').RenderMode} */ ('ankiNote'),
commonData,
- datas
+ datas,
});
}
items.push({template, templateItems});
@@ -439,7 +439,7 @@ export class AnkiNoteBuilder {
audioDetails,
screenshotDetails,
clipboardDetails,
- dictionaryMediaDetails
+ dictionaryMediaDetails,
);
const {audioFileName, screenshotFileName, clipboardImageFileName, clipboardText, dictionaryMedia: dictionaryMediaArray, errors} = injectedMedia;
const textFurigana = textFuriganaPromise !== null ? await textFuriganaPromise : [];
@@ -463,7 +463,7 @@ export class AnkiNoteBuilder {
clipboardText: (typeof clipboardText === 'string' ? {value: clipboardText} : void 0),
selectionText: (typeof selectionText === 'string' ? {value: selectionText} : void 0),
textFurigana,
- dictionaryMedia
+ dictionaryMedia,
};
return {media, errors};
}