aboutsummaryrefslogtreecommitdiff
path: root/test/hotkey-util.test.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2024-02-08 06:52:06 -0500
committerGitHub <noreply@github.com>2024-02-08 11:52:06 +0000
commitd4381831209dfbbbddd6d238c68461c9601573e2 (patch)
tree87839d80f838464ff92ebc7fa652029b9329cc96 /test/hotkey-util.test.js
parent725a90dd6570044a3df6631051aaab8b026ca6c2 (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 'test/hotkey-util.test.js')
-rw-r--r--test/hotkey-util.test.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/hotkey-util.test.js b/test/hotkey-util.test.js
index 0a76d0f2..bf1124a5 100644
--- a/test/hotkey-util.test.js
+++ b/test/hotkey-util.test.js
@@ -22,7 +22,7 @@ import {HotkeyUtil} from '../ext/js/input/hotkey-util.js';
/** */
function testCommandConversions() {
describe('CommandConversions', () => {
- /* eslint-disable no-multi-spaces */
+ /* eslint-disable @stylistic/no-multi-spaces */
/** @type {{os: import('environment').OperatingSystem, command: string, expectedCommand: string, expectedInput: {key: string, modifiers: import('input').Modifier[]}}[]} */
const data = [
{os: 'win', command: 'Alt+F', expectedCommand: 'Alt+F', expectedInput: {key: 'KeyF', modifiers: ['alt']}},
@@ -40,7 +40,7 @@ function testCommandConversions() {
{os: 'linux', command: 'MacCtrl+Alt+Shift+F1', expectedCommand: 'Ctrl+Alt+Shift+F1', expectedInput: {key: 'F1', modifiers: ['ctrl', 'alt', 'shift']}},
{os: 'linux', command: 'Command+Alt+Shift+F1', expectedCommand: 'Command+Alt+Shift+F1', expectedInput: {key: 'F1', modifiers: ['meta', 'alt', 'shift']}}
];
- /* eslint-enable no-multi-spaces */
+ /* eslint-enable @stylistic/no-multi-spaces */
const hotkeyUtil = new HotkeyUtil();
for (const {command, os, expectedInput, expectedCommand} of data) {
@@ -58,7 +58,7 @@ function testCommandConversions() {
/** */
function testDisplayNames() {
describe('DisplayNames', () => {
- /* eslint-disable no-multi-spaces */
+ /* eslint-disable @stylistic/no-multi-spaces */
/** @type {{os: import('environment').OperatingSystem, key: ?string, modifiers: import('input').Modifier[], expected: string}[]} */
const data = [
{os: 'win', key: null, modifiers: [], expected: ''},
@@ -137,7 +137,7 @@ function testDisplayNames() {
{os: 'unknown', key: 'KeyF', modifiers: ['mouse1'], expected: 'Mouse 1 + F'},
{os: 'unknown', key: 'F1', modifiers: ['mouse1'], expected: 'Mouse 1 + F1'}
];
- /* eslint-enable no-multi-spaces */
+ /* eslint-enable @stylistic/no-multi-spaces */
const hotkeyUtil = new HotkeyUtil();