Skip to content

Commit 34bc806

Browse files
authored
Fix/revert eslint compat (#1324)
* Revert "chore(deps): bump @eslint/compat from 1.1.1 to 1.2.8 (#1216)" This reverts commit 3c4ea82. * fix package lock
1 parent ccc8305 commit 34bc806

File tree

23 files changed

+13658
-8004
lines changed

23 files changed

+13658
-8004
lines changed

apps/studio/src/lib/dates.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ export const formatRelativeTime = (
77
) => {
88
if (date === null || date === undefined) return
99

10-
baseDate ??= new Date()
10+
if (!baseDate) {
11+
baseDate = new Date()
12+
}
1113

1214
let deltaSeconds = (date.getTime() - baseDate.getTime()) / 1000
1315
const isFuture = deltaSeconds > 0 ? true : false

apps/studio/src/lib/logger.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ interface LoggerOptions {
2525
export class PinoLogger {
2626
private static instance?: pino.Logger<string>
2727
private static getInstance() {
28-
PinoLogger.instance ??= PinoLogger.createBaseLogger()
28+
if (!PinoLogger.instance)
29+
PinoLogger.instance = PinoLogger.createBaseLogger()
2930
return PinoLogger.instance
3031
}
3132
private static createBaseLogger = (): pino.Logger<string> => {

apps/studio/tests/common.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@ import { GenericContainer, Wait } from "testcontainers"
55
import { z } from "zod"
66

77
type ContainerType = "database" | "mockpass"
8-
export const CONTAINER_CONFIGURATIONS: Record<
9-
ContainerType,
10-
ContainerConfiguration
11-
> = {
8+
export const CONTAINER_CONFIGURATIONS: {
9+
[key in ContainerType]: ContainerConfiguration
10+
} = {
1211
database: {
1312
name: "database",
1413
image: "postgres:15-alpine",

apps/studio/tests/integration/helpers/iron-session.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ class MockIronStore {
2929
}
3030

3131
static getOrCreateStore(): MockIronStore {
32-
MockIronStore.instance ??= new MockIronStore()
32+
if (!MockIronStore.instance) {
33+
MockIronStore.instance = new MockIronStore()
34+
}
3335
return MockIronStore.instance
3436
}
3537

0 commit comments

Comments
 (0)