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:
renovate[bot]
2024-06-03 21:04:13 +02:00
committed by GitHub
parent 60a8545cb7
commit a2eb3a6e43
13 changed files with 249 additions and 1074 deletions
-2
View File
@@ -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);
}
}
+3 -1
View File
@@ -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;
},
});