From d4381831209dfbbbddd6d238c68461c9601573e2 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Thu, 8 Feb 2024 06:52:06 -0500 Subject: Update eslint (#638) * Add json test * Update vscode settings to better handle json * Collapse eslint rules for easier readability * Reorganize * Update no-multi-spaces rule for JSON * Rules updates * Switch to @stylistic/eslint-plugin * Update deprecated stylistic rules * Group stylistic rules * Simplify rules * Move eslint env overrides to end of file * Add test * Move promiseAnimationFrame to separate file * Remove unneeded eslint disable * Remove unneeded --- ext/js/data/options-util.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ext/js/data') diff --git a/ext/js/data/options-util.js b/ext/js/data/options-util.js index 3f3a5ab8..d93927a7 100644 --- a/ext/js/data/options-util.js +++ b/ext/js/data/options-util.js @@ -687,7 +687,7 @@ export class OptionsUtil { const rawPattern1 = '{{~#if definitionTags~}}({{#each definitionTags}}{{name}}{{#unless @last}}, {{/unless}}{{/each}}) {{/if~}}'; const pattern1 = new RegExp(`((\r?\n)?[ \t]*)${escapeRegExp(rawPattern1)}`, 'g'); const replacement1 = ( - // eslint-disable-next-line indent + // eslint-disable-next-line @stylistic/indent `{{~#scope~}} {{~#set "any" false}}{{/set~}} {{~#if definitionTags~}}{{#each definitionTags~}} @@ -771,7 +771,7 @@ export class OptionsUtil { }; delete profile.options.anki.sentenceExt; profile.options.general.popupActionBarLocation = 'top'; - /* eslint-disable no-multi-spaces */ + /* eslint-disable @stylistic/no-multi-spaces */ profile.options.inputs = { hotkeys: [ {action: 'close', key: 'Escape', modifiers: [], scopes: ['popup'], enabled: true}, @@ -792,7 +792,7 @@ export class OptionsUtil { {action: 'copyHostSelection', key: 'KeyC', modifiers: ['ctrl'], scopes: ['popup'], enabled: true} ] }; - /* eslint-enable no-multi-spaces */ + /* eslint-enable @stylistic/no-multi-spaces */ profile.options.anki.suspendNewCards = false; profile.options.popupWindow = { width: profile.options.general.popupWidth, -- cgit v1.2.3