summaryrefslogtreecommitdiff
path: root/ext/js/pages/settings/anki-controller.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/pages/settings/anki-controller.js
parentb3f54747eb2694bdc90bce72e5532e99d374ef08 (diff)
Allow trailing commas in ESLint (#1013)
* Update comma-dangle rule * Fix dangling commas
Diffstat (limited to 'ext/js/pages/settings/anki-controller.js')
-rw-r--r--ext/js/pages/settings/anki-controller.js22
1 files changed, 11 insertions, 11 deletions
diff --git a/ext/js/pages/settings/anki-controller.js b/ext/js/pages/settings/anki-controller.js
index 1be41490..63717600 100644
--- a/ext/js/pages/settings/anki-controller.js
+++ b/ext/js/pages/settings/anki-controller.js
@@ -43,7 +43,7 @@ export class AnkiController {
ignoreSelector: null,
onAdded: this._createCardController.bind(this),
onRemoved: this._removeCardController.bind(this),
- isStale: this._isCardControllerStale.bind(this)
+ isStale: this._isCardControllerStale.bind(this),
});
/** @type {Intl.Collator} */
this._stringComparer = new Intl.Collator(); // Locale does not matter
@@ -95,7 +95,7 @@ export class AnkiController {
this._ankiEnableCheckbox.addEventListener(
/** @type {string} */ ('settingChanged'),
/** @type {EventListener} */ (this._onAnkiEnableChanged.bind(this)),
- false
+ false,
);
}
for (const input of ankiCardPrimaryTypeRadios) {
@@ -314,7 +314,7 @@ export class AnkiController {
const fieldMenuTargets = [
[['term'], 'anki-card-terms-field-menu'],
[['kanji'], 'anki-card-kanji-field-menu'],
- [['term', 'kanji'], 'anki-card-all-field-menu']
+ [['term', 'kanji'], 'anki-card-all-field-menu'],
];
const {templates} = this._settingsController;
for (const [types, templateName] of fieldMenuTargets) {
@@ -363,10 +363,10 @@ export class AnkiController {
this._setAnkiStatusChanging();
const [
[deckNames, getDeckNamesError],
- [modelNames, getModelNamesError]
+ [modelNames, getModelNamesError],
] = await Promise.all([
this._getDeckNames(),
- this._getModelNames()
+ this._getModelNames(),
]);
if (getDeckNamesError !== null) {
@@ -481,7 +481,7 @@ export class AnkiController {
'"よむ" deck:current',
'"よむ"',
'deck:current',
- ''
+ '',
];
let noteId = null;
@@ -864,7 +864,7 @@ class AnkiCardController {
await this._settingsController.modifyProfileSettings([{
action: 'set',
path: ObjectPropertyAccessor.getPathString(['anki', this._optionsType, 'deck']),
- value
+ value,
}]);
}
@@ -909,13 +909,13 @@ class AnkiCardController {
{
action: 'set',
path: ObjectPropertyAccessor.getPathString(['anki', this._optionsType, 'model']),
- value
+ value,
},
{
action: 'set',
path: ObjectPropertyAccessor.getPathString(['anki', this._optionsType, 'fields']),
- value: fields
- }
+ value: fields,
+ },
];
this._modelController.value = value;
@@ -1011,7 +1011,7 @@ class AnkiCardController {
['glossary', ['definition', 'meaning']],
['audio', ['sound']],
['dictionary', ['dict']],
- ['pitch-accents', ['pitch']]
+ ['pitch-accents', ['pitch']],
]);
const hyphenPattern = /-/g;