mirror of
https://github.com/tauri-apps/tauri-plugin-shell.git
synced 2026-01-31 00:45:19 +01: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> Committed via a GitHub action: https://github.com/tauri-apps/plugins-workspace/actions/runs/9355815682 Co-authored-by: FabianLars <FabianLars@users.noreply.github.com>
This commit is contained in:
@@ -122,7 +122,6 @@ class EventEmitter {
|
||||
once(eventName, listener) {
|
||||
const wrapper = (arg) => {
|
||||
this.removeListener(eventName, wrapper);
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
||||
listener(arg);
|
||||
};
|
||||
return this.addListener(eventName, wrapper);
|
||||
@@ -148,9 +147,8 @@ class EventEmitter {
|
||||
* @since 2.0.0
|
||||
*/
|
||||
removeAllListeners(event) {
|
||||
// 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 {
|
||||
@@ -170,9 +168,8 @@ class EventEmitter {
|
||||
*/
|
||||
emit(eventName, arg) {
|
||||
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;
|
||||
|
||||
@@ -120,7 +120,6 @@ class EventEmitter {
|
||||
once(eventName, listener) {
|
||||
const wrapper = (arg) => {
|
||||
this.removeListener(eventName, wrapper);
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
||||
listener(arg);
|
||||
};
|
||||
return this.addListener(eventName, wrapper);
|
||||
@@ -146,9 +145,8 @@ class EventEmitter {
|
||||
* @since 2.0.0
|
||||
*/
|
||||
removeAllListeners(event) {
|
||||
// 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 {
|
||||
@@ -168,9 +166,8 @@ class EventEmitter {
|
||||
*/
|
||||
emit(eventName, arg) {
|
||||
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;
|
||||
|
||||
@@ -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