summaryrefslogtreecommitdiff
path: root/ext/js/display/display-anki.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/display/display-anki.js
parentb3f54747eb2694bdc90bce72e5532e99d374ef08 (diff)
Allow trailing commas in ESLint (#1013)
* Update comma-dangle rule * Fix dangling commas
Diffstat (limited to 'ext/js/display/display-anki.js')
-rw-r--r--ext/js/display/display-anki.js24
1 files changed, 12 insertions, 12 deletions
diff --git a/ext/js/display/display-anki.js b/ext/js/display/display-anki.js
index 6ac84ede..fa82a7b6 100644
--- a/ext/js/display/display-anki.js
+++ b/ext/js/display/display-anki.js
@@ -94,7 +94,7 @@ export class DisplayAnki {
/** @type {Map<import('dictionary').DictionaryEntryType, import('display-anki').CreateMode[]>} */
this._dictionaryEntryTypeModeMap = new Map([
['kanji', ['kanji']],
- ['term', ['term-kanji', 'term-kana']]
+ ['term', ['term-kanji', 'term-kana']],
]);
/** @type {HTMLElement} */
this._menuContainer = querySelectorNotNull(document, '#popup-menus');
@@ -118,7 +118,7 @@ export class DisplayAnki {
['addNoteKanji', () => { this._hotkeySaveAnkiNoteForSelectedEntry('kanji'); }],
['addNoteTermKanji', () => { this._hotkeySaveAnkiNoteForSelectedEntry('term-kanji'); }],
['addNoteTermKana', () => { this._hotkeySaveAnkiNoteForSelectedEntry('term-kana'); }],
- ['viewNotes', this._viewNotesForSelectedEntry.bind(this)]
+ ['viewNotes', this._viewNotesForSelectedEntry.bind(this)],
]);
/* eslint-enable @stylistic/no-multi-spaces */
this._display.on('optionsUpdated', this._onOptionsUpdated.bind(this));
@@ -146,7 +146,7 @@ export class DisplayAnki {
resultOutputMode: this._resultOutputMode,
glossaryLayoutMode: this._glossaryLayoutMode,
compactTags: this._compactTags,
- marker: 'test'
+ marker: 'test',
});
} catch (e) {
ankiNoteDataException = e;
@@ -179,7 +179,7 @@ export class DisplayAnki {
return {
ankiNoteData,
ankiNoteDataException: toError(ankiNoteDataException),
- ankiNotes
+ ankiNotes,
};
}
@@ -203,9 +203,9 @@ export class DisplayAnki {
terms,
noteGuiMode,
screenshot: {format, quality},
- downloadTimeout
+ downloadTimeout,
},
- scanning: {length: scanLength}
+ scanning: {length: scanLength},
} = options;
this._checkForDuplicates = checkForDuplicates;
@@ -345,7 +345,7 @@ export class DisplayAnki {
sentence,
documentTitle,
query,
- fullQuery
+ fullQuery,
};
}
@@ -762,7 +762,7 @@ export class DisplayAnki {
const results = [];
for (let i = 0, ii = dictionaryEntries.length; i < ii; ++i) {
results.push({
- modeMap: new Map()
+ modeMap: new Map(),
});
}
@@ -828,14 +828,14 @@ export class DisplayAnki {
screenshot: {
format: this._screenshotFormat,
quality: this._screenshotQuality,
- contentOrigin
+ contentOrigin,
},
textParsing: {
optionsContext,
- scanLength: this._scanLength
- }
+ scanLength: this._scanLength,
+ },
},
- requirements
+ requirements,
});
return {note, errors, requirements: outputRequirements};
}