Skip to content

Commit 9cc388b

Browse files
committed
chore: upgrade to eslint version 10
1 parent e154448 commit 9cc388b

File tree

11 files changed

+373
-377
lines changed

11 files changed

+373
-377
lines changed

@types/addon.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ declare namespace TabmixPlacesNS {
566566
function updateRestoringTabsList(tab: Tab): void;
567567
function restoreNextTab(): void;
568568
function addImageToLazyPendingTab(tab: Tab): void;
569-
function setTabTitle(aTab: Tab, aUrl: string, title: string): void;
569+
function setTabTitle(aTab: Tab, title: string): void;
570570
function asyncSetTabTitle(tab: Tab, options?: {url?: string; initial?: boolean; reset?: boolean; titlefrombookmark?: boolean}): Promise<boolean>;
571571
function asyncGetTabTitle(tab: Tab, url: string, options?: {title?: string; titlefrombookmark?: boolean}): Promise<string>;
572572
function getTitleFromBookmark(url: string, title?: string, titlefrombookmark?: boolean): Promise<string>;

addon/chrome/content/minit/minit.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1786,7 +1786,7 @@ var TMP_tabDNDObserver = {
17861786
gBrowser.isTabGroupLabel(tab) ? tabOrSplitview(tab.group.tabs[0]) : tabOrSplitview(tab);
17871787
const oldIndex = getIndex(draggedElm);
17881788

1789-
let newIndex = -1;
1789+
let newIndex;
17901790
let dropBefore = true;
17911791
let dropOnStart = false;
17921792
let isBetweenGroups = false;

addon/chrome/content/minit/tablib.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -221,14 +221,13 @@ Tabmix.tablib = {
221221

222222
Tabmix.originalFunctions.gBrowser_removeTab = gBrowser.removeTab;
223223
gBrowser.removeTab = function (aTab, aParams = {}, ...args) {
224-
let result;
225224
if (!aTab || aTab.hasAttribute("protected")) {
226-
return result;
225+
return undefined;
227226
}
228227
let lastTabInGroup = this.visibleTabs.length == 1;
229228
if (lastTabInGroup) {
230229
if (Tabmix.prefs.getBoolPref("keepLastTab")) {
231-
return result;
230+
return undefined;
232231
}
233232
// fix bug in TGM when closing last tab in a group with animation
234233
if (Tabmix.extensions.tabGroupManager) {
@@ -1162,7 +1161,7 @@ Tabmix.tablib = {
11621161
aTab = this._selectedTab;
11631162
}
11641163

1165-
var newTab = null;
1164+
var newTab;
11661165
let copyToNewWindow = window != aTab.ownerGlobal;
11671166
let openDuplicateNext =
11681167
!disallowSelect && !copyToNewWindow && Tabmix.prefs.getBoolPref("openDuplicateNext");
@@ -1731,10 +1730,13 @@ Tabmix.tablib = {
17311730
warnOnClose,
17321731
{checkboxLabel2 = "", restoreSession = null} = {}
17331732
) {
1734-
let warningTitle = "",
1735-
buttonLabel = "",
1736-
chkBoxLabel = "",
1737-
warningText = "";
1733+
/** @type {string} */
1734+
let warningTitle;
1735+
/** @type {string} */
1736+
let buttonLabel;
1737+
/** @type {string} */
1738+
let chkBoxLabel;
1739+
let warningText = "";
17381740
if (shouldPrompt === 1) {
17391741
// @ts-expect-error - return types are strings
17401742
[warningTitle, buttonLabel, chkBoxLabel] = gBrowser.tabLocalization.formatValuesSync([

addon/chrome/content/places/places.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -632,15 +632,11 @@ var TMP_Places = {
632632
}
633633
},
634634

635-
setTabTitle: function TMP_PC_setTabTitle(aTab, aUrl, title) {
635+
setTabTitle(aTab, title) {
636636
if (!aTab || !aTab.parentNode) {
637637
return false;
638638
}
639639

640-
if (!aUrl) {
641-
aUrl = aTab.linkedBrowser.currentURI.spec;
642-
}
643-
644640
if (title != aTab.label) {
645641
aTab.setAttribute("tabmix_changed_label", title);
646642
gBrowser._setTabLabel(aTab, title);
@@ -671,7 +667,7 @@ var TMP_Places = {
671667
return false;
672668
}
673669
if (newTitle != tab.label) {
674-
this.setTabTitle(tab, url, newTitle);
670+
this.setTabTitle(tab, newTitle);
675671
if (initial) {
676672
tab._labelIsInitialTitle = true;
677673
}

addon/chrome/content/tab/tab.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -948,7 +948,7 @@ Tabmix.tabsUtils = {
948948
},
949949

950950
showNewTabButtonOnSide(aCondition, aValue) {
951-
let value = null;
951+
let value;
952952
if (this._show_newtabbutton === null) {
953953
value = null;
954954
} else if (

addon/chrome/content/tabmix.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1091,7 +1091,7 @@ var TMP_eventListener = {
10911091
*/
10921092
let scrollByDelta = function (delta, useInstant) {
10931093
let instant;
1094-
let scrollAmount = 0;
1094+
let scrollAmount;
10951095
if (isTabstrip && TabmixTabbar.isMultiRow) {
10961096
delta = delta > 0 ? 1 : -1;
10971097
scrollAmount = delta * tabStrip.singleRowHeight + tabStrip._distanceToRow(0);

addon/modules/ContentClick.sys.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1310,8 +1310,8 @@ ContentClickInternal = {
13101310
}
13111311

13121312
if (url.match(/^http/)) {
1313-
let maybeFixedURI = null;
1314-
maybeFixedURI = fixedURI || makeURI(url);
1313+
/** @type {nsIURI | null} */
1314+
let maybeFixedURI = fixedURI || makeURI(url);
13151315

13161316
// catch redirect
13171317
const pathProp = "pathQueryRef";

addon/modules/DynamicRules.sys.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ export const DynamicRules = {
365365
}
366366

367367
/** @type {Partial<DynamicRulesModule.TabStyle> & {[key: string]: any}} */
368-
let currentPrefValues = {};
368+
let currentPrefValues;
369369

370370
/** @type {Partial<DynamicRulesModule.TabStyle> & {[key: string]: any}} */
371371
const prefValues = {};

addon/modules/log.sys.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ export const console = {
128128
},
129129

130130
_getStackExcludingInternal(stack) {
131-
let stackList = [];
131+
let stackList;
132132
if (!stack) {
133133
stackList = Error().stack?.split("\n").slice(2) ?? [];
134134
} else {

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,25 +28,25 @@
2828
},
2929
"homepage": "https://github.com/onemen/TabMixPlus#readme",
3030
"devDependencies": {
31-
"@eslint/js": "9.39.2",
32-
"@stylistic/eslint-plugin": "^5.7.1",
31+
"@eslint/js": "10.0.1",
32+
"@stylistic/eslint-plugin": "^5.8.0",
3333
"@stylistic/eslint-plugin-js": "^4.4.1",
34-
"@typescript/native-preview": "7.0.0-dev.20260203.1",
35-
"eslint": "9.39.2",
34+
"@typescript/native-preview": "7.0.0-dev.20260213.1",
35+
"eslint": "10.0.0",
3636
"eslint-config-prettier": "^10.1.8",
37-
"eslint-plugin-jsdoc": "61.5.0",
38-
"eslint-plugin-jsonc": "^2.21.0",
37+
"eslint-plugin-jsdoc": "62.5.4",
38+
"eslint-plugin-jsonc": "^2.21.1",
3939
"eslint-plugin-mozilla": "^4.3.4",
4040
"eslint-plugin-prettier": "^5.5.5",
4141
"eslint-plugin-tabmix": "workspace:./config/eslint-plugin-tabmix",
42-
"globals": "^16.5.0",
42+
"globals": "^17.3.0",
4343
"husky": "^9.1.7",
4444
"prettier": "^3.8.1",
4545
"prettier-plugin-jsdoc": "^1.8.0",
4646
"stylelint": "^17.0.0",
4747
"stylelint-config-standard": "^40.0.0",
4848
"typescript": "^5.9.3",
49-
"typescript-eslint": "^8.46.3"
49+
"typescript-eslint": "^8.55.0"
5050
},
5151
"resolutions": {
5252
"js-yaml": ">=4.1.1"

0 commit comments

Comments
 (0)