summaryrefslogtreecommitdiff
path: root/ext/js/data/options-util.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2023-12-16 20:04:56 -0500
committerGitHub <noreply@github.com>2023-12-17 01:04:56 +0000
commitb249627434d3a94420ac4d98c3ce720767e57b43 (patch)
treeec46e2c020c5a63a5c2babf56376f53e288ed7f2 /ext/js/data/options-util.js
parentdecbc60f7734e739c0e5c41da294f65f9eec92fe (diff)
Update eslint spacing rules (#366)
* Add space-infix-ops rule * Add no-multi-spaces --------- Co-authored-by: Darius Jahandarie <djahandarie@gmail.com>
Diffstat (limited to 'ext/js/data/options-util.js')
-rw-r--r--ext/js/data/options-util.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/js/data/options-util.js b/ext/js/data/options-util.js
index 70c1622f..c3c0e685 100644
--- a/ext/js/data/options-util.js
+++ b/ext/js/data/options-util.js
@@ -39,7 +39,7 @@ export class OptionsUtil {
* @param {?number} [targetVersion]
* @returns {Promise<import('settings').Options>}
*/
- async update(optionsInput, targetVersion=null) {
+ async update(optionsInput, targetVersion = null) {
// Invalid options
let options = /** @type {{[key: string]: unknown}} */ (
typeof optionsInput === 'object' && optionsInput !== null && !Array.isArray(optionsInput) ?
@@ -530,6 +530,7 @@ export class OptionsUtil {
* @returns {import('options-util').ModernUpdate[]}
*/
_getVersionUpdates(targetVersion) {
+ /* eslint-disable no-multi-spaces */
const result = [
{async: false, update: this._updateVersion1.bind(this)},
{async: false, update: this._updateVersion2.bind(this)},
@@ -553,6 +554,7 @@ export class OptionsUtil {
{async: false, update: this._updateVersion20.bind(this)},
{async: true, update: this._updateVersion21.bind(this)}
];
+ /* eslint-enable no-multi-spaces */
if (typeof targetVersion === 'number' && targetVersion < result.length) {
result.splice(targetVersion);
}
@@ -818,6 +820,7 @@ export class OptionsUtil {
};
delete profile.options.anki.sentenceExt;
profile.options.general.popupActionBarLocation = 'top';
+ /* eslint-disable no-multi-spaces */
profile.options.inputs = {
hotkeys: [
{action: 'close', key: 'Escape', modifiers: [], scopes: ['popup'], enabled: true},
@@ -838,6 +841,7 @@ export class OptionsUtil {
{action: 'copyHostSelection', key: 'KeyC', modifiers: ['ctrl'], scopes: ['popup'], enabled: true}
]
};
+ /* eslint-enable no-multi-spaces */
profile.options.anki.suspendNewCards = false;
profile.options.popupWindow = {
width: profile.options.general.popupWidth,