mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-04-29 12:06:01 +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:
@@ -171,7 +171,6 @@ class EventEmitter<E extends Record<string, any>> {
|
||||
): this {
|
||||
const wrapper = (arg: E[typeof eventName]): void => {
|
||||
this.removeListener(eventName, wrapper);
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
||||
listener(arg);
|
||||
};
|
||||
return this.addListener(eventName, wrapper);
|
||||
@@ -204,9 +203,8 @@ class EventEmitter<E extends Record<string, any>> {
|
||||
* @since 2.0.0
|
||||
*/
|
||||
removeAllListeners<N extends keyof E>(event?: N): this {
|
||||
// eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
|
||||
if (event) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-dynamic-delete,security/detect-object-injection
|
||||
// eslint-disable-next-line security/detect-object-injection
|
||||
delete this.eventListeners[event];
|
||||
} else {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||
@@ -226,9 +224,8 @@ class EventEmitter<E extends Record<string, any>> {
|
||||
*/
|
||||
emit<N extends keyof E>(eventName: N, arg: E[typeof eventName]): boolean {
|
||||
if (eventName in this.eventListeners) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,security/detect-object-injection
|
||||
// eslint-disable-next-line security/detect-object-injection
|
||||
const listeners = this.eventListeners[eventName];
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
||||
for (const listener of listeners) listener(arg);
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user