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

@@ -28,7 +28,6 @@ export function loadAdapter<T>(adapter, defaultAdapter, options): T {
}
}
} else if (typeof adapter === 'string') {
/* eslint-disable */
adapter = require(adapter);
// If it's define as a module, get the default
if (adapter.default) {

View File

@@ -189,9 +189,7 @@ const handleDotFields = object => {
if (value && value.__op === 'Delete') {
value = undefined;
}
/* eslint-disable no-cond-assign */
while ((next = components.shift())) {
/* eslint-enable no-cond-assign */
currentObj[next] = currentObj[next] || {};
if (components.length === 0) {
currentObj[next] = value;
@@ -819,6 +817,7 @@ const buildWhereClause = ({ schema, query, index, caseInsensitive }): WhereClaus
if (parserResult.status === 'success') {
postgresValue = toPostgresValue(parserResult.result);
} else {
// eslint-disable-next-line no-console
console.error('Error while parsing relative date', parserResult);
throw new Parse.Error(
Parse.Error.INVALID_JSON,
@@ -917,6 +916,7 @@ export class PostgresStorageAdapter implements StorageAdapter {
this._stream
.none('NOTIFY $1~, $2', ['schema.change', { senderId: this._uuid }])
.catch(error => {
// eslint-disable-next-line no-console
console.log('Failed to Notify:', error); // unlikely to ever happen
});
}
@@ -2376,7 +2376,7 @@ export class PostgresStorageAdapter implements StorageAdapter {
debug(`initializationDone in ${ctx.duration}`);
})
.catch(error => {
/* eslint-disable no-console */
// eslint-disable-next-line no-console
console.error(error);
});
}