diff --git a/src/prefs/dangerZone/clearHistory.ts b/src/prefs/dangerZone/clearHistory.ts index 84f8f00d..05fec471 100644 --- a/src/prefs/dangerZone/clearHistory.ts +++ b/src/prefs/dangerZone/clearHistory.ts @@ -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.'); } diff --git a/src/prefs/general/dbLocation.ts b/src/prefs/general/dbLocation.ts index dd3dbbfe..f211eb1e 100644 --- a/src/prefs/general/dbLocation.ts +++ b/src/prefs/general/dbLocation.ts @@ -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.'); } diff --git a/src/utils/db.ts b/src/utils/db.ts index e308e37c..1f89a861 100644 --- a/src/utils/db.ts +++ b/src/utils/db.ts @@ -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({ diff --git a/src/utils/gjs.ts b/src/utils/gjs.ts index 30a8636d..157794f1 100644 --- a/src/utils/gjs.ts +++ b/src/utils/gjs.ts @@ -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(target.metaInfo!, target) as typeof target; } else { // eslint-disable-next-line diff --git a/src/utils/panoItemFactory.ts b/src/utils/panoItemFactory.ts index bdcdca6f..7e3bf981 100644 --- a/src/utils/panoItemFactory.ts +++ b/src/utils/panoItemFactory.ts @@ -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; } }; diff --git a/src/utils/shell.ts b/src/utils/shell.ts index f88c8298..7d8be709 100644 --- a/src/utils/shell.ts +++ b/src/utils/shell.ts @@ -86,7 +86,7 @@ export const deleteDirectory = async (file: Gio.File) => { } await Promise.all(branches); - } catch (e) { + } catch (_) { } finally { return deleteFile(file); } @@ -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}`); } @@ -224,7 +224,7 @@ export function debounce(func: (...args: T) => void | Promise { try { Gio.app_info_launch_default_for_uri(url, null); - } catch (e) { + } catch (_) { debug(`Failed to open url ${url}`); } };