diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2024-02-08 06:52:06 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-08 11:52:06 +0000 |
commit | d4381831209dfbbbddd6d238c68461c9601573e2 (patch) | |
tree | 87839d80f838464ff92ebc7fa652029b9329cc96 /ext/js/pages | |
parent | 725a90dd6570044a3df6631051aaab8b026ca6c2 (diff) |
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
Diffstat (limited to 'ext/js/pages')
-rw-r--r-- | ext/js/pages/settings/keyboard-shortcuts-controller.js | 4 | ||||
-rw-r--r-- | ext/js/pages/settings/popup-preview-frame.js | 4 | ||||
-rw-r--r-- | ext/js/pages/settings/profile-conditions-ui.js | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/ext/js/pages/settings/keyboard-shortcuts-controller.js b/ext/js/pages/settings/keyboard-shortcuts-controller.js index 9392f768..24d34d5b 100644 --- a/ext/js/pages/settings/keyboard-shortcuts-controller.js +++ b/ext/js/pages/settings/keyboard-shortcuts-controller.js @@ -45,7 +45,7 @@ export class KeyboardShortcutController { this._stringComparer = new Intl.Collator('en-US'); // Invariant locale /** @type {HTMLElement} */ this._scrollContainer = querySelectorNotNull(document, '#keyboard-shortcuts-modal .modal-body'); - /* eslint-disable no-multi-spaces */ + /* eslint-disable @stylistic/no-multi-spaces */ /** @type {Map<string, import('keyboard-shortcut-controller').ActionDetails>} */ this._actionDetails = new Map([ ['', {scopes: new Set()}], @@ -70,7 +70,7 @@ export class KeyboardShortcutController { ['scanTextAtCaret', {scopes: new Set(['web'])}], ['toggleOption', {scopes: new Set(['popup', 'search']), argument: {template: 'hotkey-argument-setting-path', default: ''}}] ]); - /* eslint-enable no-multi-spaces */ + /* eslint-enable @stylistic/no-multi-spaces */ } /** @type {import('./settings-controller.js').SettingsController} */ diff --git a/ext/js/pages/settings/popup-preview-frame.js b/ext/js/pages/settings/popup-preview-frame.js index e9cfa541..1ad4859b 100644 --- a/ext/js/pages/settings/popup-preview-frame.js +++ b/ext/js/pages/settings/popup-preview-frame.js @@ -59,7 +59,7 @@ export class PopupPreviewFrame { /** @type {string} */ this._targetOrigin = chrome.runtime.getURL('/').replace(/\/$/, ''); - /* eslint-disable no-multi-spaces */ + /* eslint-disable @stylistic/no-multi-spaces */ /** @type {Map<string, (params: import('core').SerializableObjectAny) => void>} */ this._windowMessageHandlers = new Map(/** @type {[key: string, handler: (params: import('core').SerializableObjectAny) => void][]} */ ([ ['PopupPreviewFrame.setText', this._onSetText.bind(this)], @@ -67,7 +67,7 @@ export class PopupPreviewFrame { ['PopupPreviewFrame.setCustomOuterCss', this._setCustomOuterCss.bind(this)], ['PopupPreviewFrame.updateOptionsContext', this._updateOptionsContext.bind(this)] ])); - /* eslint-enable no-multi-spaces */ + /* eslint-enable @stylistic/no-multi-spaces */ } /** */ diff --git a/ext/js/pages/settings/profile-conditions-ui.js b/ext/js/pages/settings/profile-conditions-ui.js index d07751fb..5801af17 100644 --- a/ext/js/pages/settings/profile-conditions-ui.js +++ b/ext/js/pages/settings/profile-conditions-ui.js @@ -51,7 +51,7 @@ export class ProfileConditionsUI extends EventDispatcher { const normalizeInteger = this._normalizeInteger.bind(this); const validateFlags = this._validateFlags.bind(this); const normalizeFlags = this._normalizeFlags.bind(this); - /* eslint-disable no-multi-spaces */ + /* eslint-disable @stylistic/no-multi-spaces */ /** @type {Map<import('profile-conditions-ui').DescriptorType, import('profile-conditions-ui').Descriptor>} */ this._descriptors = new Map([ [ @@ -107,7 +107,7 @@ export class ProfileConditionsUI extends EventDispatcher { } ] ]); - /* eslint-enable no-multi-spaces */ + /* eslint-enable @stylistic/no-multi-spaces */ /** @type {Set<string>} */ this._validFlags = new Set([ 'clipboard' |