fix(deps): upgrade eslint and plugins to 9.39.4 (#201701)

* fix(deps): upgrade eslint and plugins to 10.2.0

* chore: manual lint-fix

* chore: automatic lint-fix

* feat(repo): github actions - lint - use node v24

because it is linting (not runtime), so why not
to use the latest stable Node version

* fix: remove @stylistic/eslint-plugin (in favor of prettier)

* fix: eslint uses `ecmaVersion` 2025

* fix: eslint's "mocha" config is isolated (for test files only)

for example `describe` is not considered "global" outside the
test files. the same for all other "eslint/mocha" rules -
they are applied only to files in `/tests` folder.

* chore: update package-lock.json after eslint upgrade
This commit is contained in:
Maksim Koryukov 2026-04-18 16:50:05 -04:00 • committed by GitHub
commit 211205363c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 370 additions and 414 deletions

View file

@ -107,6 +107,7 @@ class Client extends EventEmitter {
Util.setFfmpegPath(this.options.ffmpegPath);
}
/**
* Injection logic
* Private function
@ -322,7 +323,7 @@ class Client extends EventEmitter {
await webCache.persist(this.currentIndexHtml, version);
}
//Load util functions (serializers, helper functions)
// Load util functions (serializers, helper functions)
await this.pupPage.evaluate(LoadUtils);
let start = Date.now();
@ -2371,7 +2372,7 @@ class Client extends EventEmitter {
},
participantWids,
);
} catch (err) {
} catch (ignoredError) {
return 'CreateGroupError: An unknown error occupied while creating a group';
}
@ -2610,7 +2611,7 @@ class Client extends EventEmitter {
meContact,
));
}
} catch (error) {
} catch (ignoredError) {
return false;
}

View file

@ -8,6 +8,7 @@ class BaseAuthStrategy {
setup(client) {
this.client = client;
}
async beforeBrowserInitialized() {}
async afterBrowserInitialized() {}
async onAuthenticationNeeded() {
@ -17,6 +18,7 @@ class BaseAuthStrategy {
failureEventPayload: undefined,
};
}
async getAuthEventPayload() {}
async afterAuthReady() {}
async disconnect() {}

View file

@ -37,6 +37,7 @@ class Label extends Base {
*/
this.hexColor = labelData.hexColor;
}
/**
* Get all chats that have been assigned this Label
* @returns {Promise<Array<Chat>>}

View file

@ -804,6 +804,7 @@ class Message extends Base {
}
return undefined;
}
/**
* Gets the payment details associated with a given message
* @return {Promise<Payment>}
@ -989,6 +990,7 @@ class Message extends Base {
return edittedEventMsg && new Message(this.client, edittedEventMsg);
}
/**
* Returns the PollVote this poll message
* @returns {Promise<PollVote[]>}

View file

@ -333,7 +333,7 @@ exports.LoadUtils = () => {
.vcardGetNameFromParsed(parsed),
};
}
} catch (_) {
} catch (ignoredError) {
// not a vcard
}
}
@ -361,7 +361,7 @@ exports.LoadUtils = () => {
content = options.buttons.body;
caption = content;
} else {
caption = options.caption ? options.caption : ' '; //Caption can't be empty
caption = options.caption ? options.caption : ' '; // Caption can't be empty
}
buttonOptions = {
productHeaderImageRejected: false,
@ -857,7 +857,7 @@ exports.LoadUtils = () => {
.require('WAWebCollections')
.WAWebNewsletterCollection.find(chatWid);
}
} catch (err) {
} catch (ignoredError) {
chat = null;
}
} else {
@ -1175,7 +1175,7 @@ exports.LoadUtils = () => {
);
return waveform;
} catch (e) {
} catch (ignoredError) {
return undefined;
}
};
@ -1412,7 +1412,7 @@ exports.LoadUtils = () => {
return base64Image;
}
}
} catch (error) {
} catch (ignoredError) {
/* empty */
}
}
@ -1449,7 +1449,7 @@ exports.LoadUtils = () => {
rpcResult.value.addParticipant[0]
.addParticipantsParticipantAddedOrNonRegisteredWaUserParticipantErrorLidResponseMixinGroup
.value.addParticipantsParticipantMixins;
} catch (err) {
} catch (ignoredError) {
data.code = 400;
return data;
}
@ -1612,7 +1612,7 @@ exports.LoadUtils = () => {
));
}
return result;
} catch (err) {
} catch (ignoredError) {
return [];
}
};

View file

@ -22,7 +22,7 @@ class LocalWebCache extends WebCache {
try {
return fs.readFileSync(filePath, 'utf-8');
} catch (err) {
} catch (ignoredError) {
if (this.strict)
throw new VersionResolveError(
`Couldn't load version ${version} from the cache`,

View file

@ -5,6 +5,7 @@ class WebCache {
async resolve() {
return null;
}
async persist() {}
}