mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-06-06 13:53:54 +02:00
chore(deps): update dependency eslint to v9 (v2) (#1424)
* chore(deps): update dependency eslint to v9 * flat config * license header * rebuild --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: FabianLars <fabianlars@fabianlars.de>
This commit is contained in:
@@ -364,10 +364,8 @@ async function requestPermission(): Promise<Permission> {
|
||||
*/
|
||||
function sendNotification(options: Options | string): void {
|
||||
if (typeof options === "string") {
|
||||
// eslint-disable-next-line no-new
|
||||
new window.Notification(options);
|
||||
} else {
|
||||
// eslint-disable-next-line no-new
|
||||
new window.Notification(options.title, options);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,11 +57,12 @@ import type { Options } from "./index";
|
||||
|
||||
// @ts-expect-error unfortunately we can't implement the whole type, so we overwrite it with our own version
|
||||
window.Notification = function (title, options) {
|
||||
// eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||
const opts = options || {};
|
||||
void sendNotification(
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
||||
Object.assign(opts, {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||
title,
|
||||
}),
|
||||
);
|
||||
@@ -77,6 +78,7 @@ import type { Options } from "./index";
|
||||
if (!permissionSettable) {
|
||||
throw new Error("Readonly property");
|
||||
}
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||
permissionValue = v;
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user