refactor: Upgrade to eslint 9.19.0 (#9580)

This commit is contained in:
Daniel
2025-02-02 01:32:43 +11:00
committed by GitHub
parent 239e692145
commit 889dbb5aee
18 changed files with 1265 additions and 770 deletions

View File

@@ -220,6 +220,7 @@ class CiVersionCheck {
* Runs the check.
*/
async check() {
/* eslint-disable no-console */
try {
console.log(`\nChecking ${this.packageName} versions in CI environments...`);
@@ -284,6 +285,7 @@ class CiVersionCheck {
const msg = `Failed to check ${this.packageName} versions with error: ${e}`;
core.setFailed(msg);
}
/* eslint-enable no-console */
}
}

View File

@@ -14,6 +14,7 @@ const util = require('util');
fs.readFile('./src/Options/docs.js', 'utf8'),
]);
if (currentDefinitions !== newDefinitions || currentDocs !== newDocs) {
// eslint-disable-next-line no-console
console.error(
'\x1b[31m%s\x1b[0m',
'Definitions files cannot be updated manually. Please update src/Options/index.js then run `npm run definitions` to generate definitions.'

View File

@@ -87,6 +87,7 @@ class NodeEngineCheck {
nodeVersion: version
});
} catch(e) {
// eslint-disable-next-line no-console
console.log(`Ignoring file because it is not valid JSON: ${file}`);
core.warning(`Ignoring file because it is not valid JSON: ${file}`);
}
@@ -171,6 +172,7 @@ async function check() {
// Get highest version
const highestVersion = higherVersions.map(v => v.nodeMinVersion).pop();
/* eslint-disable no-console */
// If there are higher versions
if (higherVersions.length > 0) {
console.log(`\nThere are ${higherVersions.length} dependencies that require a higher node engine version than the parent package (${parentVersion.nodeVersion}):`);
@@ -189,6 +191,7 @@ async function check() {
}
console.log(`✅ All dependencies satisfy the node version requirement of the parent package (${parentVersion.nodeVersion}).`);
/* eslint-enable no-console */
}
check();