Skip to content

Commit

Permalink
Merge pull request #350 from NickDJM/330-eslint-upgrade
Browse files Browse the repository at this point in the history
330 eslint upgrade
  • Loading branch information
NickDJM authored Sep 25, 2024
2 parents 358865b + fb3c804 commit 71d2b0a
Show file tree
Hide file tree
Showing 23 changed files with 8 additions and 28 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,8 @@
"@vitest/ui": "^1.2.2",
"commitizen": "^4.3.0",
"cz-conventional-changelog": "^3.3.0",
"eslint": "^8.43.0",
"eslint": "^9.11.1",
"eslint-config-prettier": "^9.0.0",
"eslint-config-standard": "^17.1.0",
"eslint-plugin-jsdoc": "^50.0.0",
"globals": "^15.0.0",
"husky": "^9.1.1",
Expand Down
2 changes: 1 addition & 1 deletion src/_baseMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class BaseMenu {
*
* @type {typeof BaseMenu}
*/
_MenuType = BaseMenu; // eslint-disable-line no-use-before-define
_MenuType = BaseMenu;

/**
* The class to use when generating menu items.
Expand Down
1 change: 0 additions & 1 deletion src/_baseMenuItem.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// eslint-disable-next-line no-unused-vars
/* global BaseMenu, BaseMenuToggle */

/**
Expand Down
1 change: 0 additions & 1 deletion src/_baseMenuToggle.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// eslint-disable-next-line no-unused-vars
/* global BaseMenu */

import { addClass, removeClass } from "./domHelpers.js";
Expand Down
2 changes: 1 addition & 1 deletion src/disclosureMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class DisclosureMenu extends BaseMenu {
*
* @type {typeof DisclosureMenu}
*/
_MenuType = DisclosureMenu; // eslint-disable-line no-use-before-define
_MenuType = DisclosureMenu;

/**
* The class to use when generating menu items.
Expand Down
1 change: 0 additions & 1 deletion src/disclosureMenuItem.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// eslint-disable-next-line no-unused-vars
/* global DisclosureMenu, DisclosureMenuToggle */

import BaseMenuItem from "./_baseMenuItem.js";
Expand Down
1 change: 0 additions & 1 deletion src/disclosureMenuToggle.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// eslint-disable-next-line no-unused-vars
/* global DisclosureMenu */

import BaseMenuToggle from "./_baseMenuToggle.js";
Expand Down
2 changes: 1 addition & 1 deletion src/eventHandlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export function keyPress(event) {
};

return Object.keys(keys).find((key) => keys[key] === true) || "";
} catch (error) {
} catch {
// Return an empty string if something goes wrong.
return "";
}
Expand Down
2 changes: 1 addition & 1 deletion src/menubar.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class Menubar extends BaseMenu {
*
* @type {typeof Menubar}
*/
_MenuType = Menubar; // eslint-disable-line no-use-before-define
_MenuType = Menubar;

/**
* The class to use when generating menu items.
Expand Down
1 change: 0 additions & 1 deletion src/menubarItem.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// eslint-disable-next-line no-unused-vars
/* global Menubar, MenubarToggle */

import BaseMenuItem from "./_baseMenuItem.js";
Expand Down
1 change: 0 additions & 1 deletion src/menubarToggle.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// eslint-disable-next-line no-unused-vars
/* global Menubar */

import BaseMenuToggle from "./_baseMenuToggle.js";
Expand Down
2 changes: 1 addition & 1 deletion src/topLinkDisclosureMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class TopLinkDisclosureMenu extends BaseMenu {
*
* @type {typeof TopLinkDisclosureMenu}
*/
_MenuType = TopLinkDisclosureMenu; // eslint-disable-line no-use-before-define
_MenuType = TopLinkDisclosureMenu;

/**
* The class to use when generating menu items.
Expand Down
1 change: 0 additions & 1 deletion src/topLinkDisclosureMenuItem.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// eslint-disable-next-line no-unused-vars
/* global TopLinkDisclosureMenu, TopLinkDisclosureMenuToggle */

import BaseMenuItem from "./_baseMenuItem.js";
Expand Down
1 change: 0 additions & 1 deletion src/topLinkDisclosureMenuToggle.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// eslint-disable-next-line no-unused-vars
/* global TopLinkDisclosureMenu */

import BaseMenuToggle from "./_baseMenuToggle.js";
Expand Down
2 changes: 1 addition & 1 deletion src/treeview.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class Treeview extends BaseMenu {
*
* @type {typeof Treeview}
*/
_MenuType = Treeview; // eslint-disable-line no-use-before-define
_MenuType = Treeview;

/**
* The class to use when generating menu items.
Expand Down
1 change: 0 additions & 1 deletion src/treeviewItem.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// eslint-disable-next-line no-unused-vars
/* global Treeview, TreeviewToggle */

import BaseMenuItem from "./_baseMenuItem.js";
Expand Down
1 change: 0 additions & 1 deletion src/treeviewToggle.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// eslint-disable-next-line no-unused-vars
/* global Treeview */

import BaseMenuToggle from "./_baseMenuToggle.js";
Expand Down
2 changes: 1 addition & 1 deletion src/validate.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export function isQuerySelector(values) {
}

document.querySelector(values[key]);
} catch (error) {
} catch {
throw new TypeError(
`${key} must be a valid query selector. "${values[key]}" given.`
);
Expand Down
2 changes: 0 additions & 2 deletions tests/menus/DisclosureMenu/initialize.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
* that the Disclosure class can be initialized.
*/

/* eslint-disable no-new */

import {
describe,
it,
Expand Down
2 changes: 0 additions & 2 deletions tests/menus/Menubar/initialize.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
* that the Menubar class can be initialized.
*/

/* eslint-disable no-new */

import {
describe,
it,
Expand Down
2 changes: 0 additions & 2 deletions tests/menus/TopLinkDisclosureMenu/initialize.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
* that the TopLinkDisclosureMenu class can be initialized.
*/

/* eslint-disable no-new */

import {
describe,
it,
Expand Down
2 changes: 0 additions & 2 deletions tests/menus/Treeview/initialize.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
* that the Treeview class can be initialized.
*/

/* eslint-disable no-new */

import {
describe,
it,
Expand Down
1 change: 0 additions & 1 deletion tests/menus/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
* Helper functions for testing menus.
*/

// eslint-disable-next-line no-unused-vars
/* global BaseMenu */

/**
Expand Down

0 comments on commit 71d2b0a

Please sign in to comment.