Skip to content

Commit

Permalink
Lint files with new eslint config
Browse files Browse the repository at this point in the history
  • Loading branch information
QuentiumYT committed Sep 4, 2024
1 parent 0c22d9a commit 414a1b6
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/prefs/dangerZone/clearHistory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export class ClearHistoryRow extends Adw.ActionRow {
-1,
null,
);
} catch (err) {
} catch (_) {
isDbusRunning = false;
debug('Extension is not enabled. Clearing db file without stopping the extension.');
}
Expand Down
2 changes: 1 addition & 1 deletion src/prefs/general/dbLocation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export class DBLocationRow extends Adw.ActionRow {
-1,
null,
);
} catch (err) {
} catch (_) {
isDbusRunning = false;
debug('Extension is not enabled. Moving db file without stopping the extension.');
}
Expand Down
2 changes: 1 addition & 1 deletion src/utils/db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ class Database {
const matchValue = iter.get_value_for_field('matchValue');
const matchValueUnescaped = unescape_string(matchValue) ?? matchValue;
const searchValue = iter.get_value_for_field('searchValue');
const searchValueUnescaped = searchValue ? unescape_string(searchValue) ?? searchValue : undefined;
const searchValueUnescaped = searchValue ? (unescape_string(searchValue) ?? searchValue) : undefined;
const metaData = iter.get_value_for_field('metaData');

itemList.push({
Expand Down
1 change: 0 additions & 1 deletion src/utils/gjs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ export function registerGObjectClass<
if (Object.prototype.hasOwnProperty.call(target, 'metaInfo')) {
// eslint-disable-next-line
// @ts-ignore
// eslint-disable-next-line
return GObject.registerClass<K, T>(target.metaInfo!, target) as typeof target;
} else {
// eslint-disable-next-line
Expand Down
2 changes: 1 addition & 1 deletion src/utils/panoItemFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ const debug = logger('pano-item-factory');
const isValidUrl = (text: string) => {
try {
return isUrl(text) && GLib.uri_parse(text, GLib.UriFlags.NONE) !== null;
} catch (err) {
} catch (_) {
return false;
}
};
Expand Down
6 changes: 3 additions & 3 deletions src/utils/shell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export const deleteDirectory = async (file: Gio.File) => {
}

await Promise.all(branches);
} catch (e) {
} catch (_) {
} finally {
return deleteFile(file);
}
Expand Down Expand Up @@ -161,7 +161,7 @@ export const loadInterfaceXML = (ext: ExtensionBase, iface: string): any => {
try {
const [, bytes] = file.load_contents(null);
return new TextDecoder().decode(bytes);
} catch (e) {
} catch (_) {
debug(`Failed to load D-Bus interface ${iface}`);
}

Expand Down Expand Up @@ -224,7 +224,7 @@ export function debounce<T extends any[]>(func: (...args: T) => void | Promise<v
export const openLinkInBrowser = (url: string) => {
try {
Gio.app_info_launch_default_for_uri(url, null);
} catch (e) {
} catch (_) {
debug(`Failed to open url ${url}`);
}
};
Expand Down

0 comments on commit 414a1b6

Please sign in to comment.