set up eslint and prettier

This commit is contained in:
2026-02-12 20:54:14 +01:00
parent 759e336956
commit 316055652f
60 changed files with 12758 additions and 2724 deletions

View File

@@ -0,0 +1,3 @@
import baseConfig from "@zendegi/eslint-config/base";
export default baseConfig;

View File

@@ -14,6 +14,7 @@
"db:generate": "drizzle-kit generate",
"db:studio": "drizzle-kit studio",
"db:migrate": "drizzle-kit migrate",
"lint": "eslint .",
"db:start": "docker compose up -d",
"db:watch": "docker compose up",
"db:stop": "docker compose stop",
@@ -29,7 +30,9 @@
"devDependencies": {
"@types/pg": "^8.16.0",
"@zendegi/config": "workspace:*",
"@zendegi/eslint-config": "workspace:*",
"drizzle-kit": "^0.31.8",
"eslint": "^9.17.0",
"typescript": "catalog:"
}
}

View File

@@ -1,5 +1,5 @@
import { relations } from "drizzle-orm";
import { pgTable, text, timestamp, boolean, index } from "drizzle-orm/pg-core";
import { boolean, index, pgTable, text, timestamp } from "drizzle-orm/pg-core";
export const user = pgTable("user", {
id: text("id").primaryKey(),
@@ -30,7 +30,7 @@ export const session = pgTable(
.notNull()
.references(() => user.id, { onDelete: "cascade" }),
},
(table) => [index("session_userId_idx").on(table.userId)],
(table) => [index("session_userId_idx").on(table.userId)]
);
export const account = pgTable(
@@ -54,7 +54,7 @@ export const account = pgTable(
.$onUpdate(() => /* @__PURE__ */ new Date())
.notNull(),
},
(table) => [index("account_userId_idx").on(table.userId)],
(table) => [index("account_userId_idx").on(table.userId)]
);
export const verification = pgTable(
@@ -70,7 +70,7 @@ export const verification = pgTable(
.$onUpdate(() => /* @__PURE__ */ new Date())
.notNull(),
},
(table) => [index("verification_identifier_idx").on(table.identifier)],
(table) => [index("verification_identifier_idx").on(table.identifier)]
);
export const userRelations = relations(user, ({ many }) => ({