style: clean up code formatting and remove trailing whitespace

refactor: reorganize imports and fix type imports
This commit is contained in:
Evandro Fonseca Junior committed 2025-11-11 03:08:36 -03:00
1 parent d3704602fd
commit 47c04de6fe
232 files changed
+7140 -4798

No files matched your search

+3 -4
View File
@@ -3,7 +3,7 @@
* Gerencia conexão e fornece helpers para cache e sessões
*/
import { createClient, RedisClientType } from "redis";
import { createClient, type RedisClientType } from "redis";
let client: RedisClientType | null = null;
@@ -13,7 +13,7 @@ let client: RedisClientType | null = null;
function validateEnvVars() {
if (!process.env.REDIS_DB) {
throw new Error(
"REDIS_DB não está definido. Configure a variável de ambiente REDIS_DB com a connection string do Redis."
"REDIS_DB não está definido. Configure a variável de ambiente REDIS_DB com a connection string do Redis.",
);
}
}
@@ -74,7 +74,7 @@ export async function isRedisConnected(): Promise<boolean> {
* Fecha conexão com Redis
*/
export async function closeRedis(): Promise<void> {
if (client && client.isOpen) {
if (client?.isOpen) {
await client.quit();
client = null;
console.log("🔌 Conexão Redis fechada");
@@ -93,4 +93,3 @@ if (typeof process !== "undefined") {
process.exit(0);
});
}