fix: use import type for GraphConfig, remove verbatim-module-syntax exclusion
The verbatim-module-syntax lint rule was correctly flagging that GraphConfig is only used in a type position (typeof GraphConfig). Since typeof resolves purely at the type level, import type works fine here and is the correct form. No lint exclusion needed. Also: deno fmt across all files (markdown line wrapping).
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { sqliteTable, text, unique } from "drizzle-orm/sqlite-core";
|
||||
import { createInsertSchema, createSelectSchema } from "@alkdev/drizzlebox";
|
||||
import { Type, type Static } from "@alkdev/typebox";
|
||||
import { type Static, Type } from "@alkdev/typebox";
|
||||
import { commonCols } from "./common.ts";
|
||||
import { graphs } from "./graphs.ts";
|
||||
|
||||
@@ -8,7 +8,9 @@ const AttributesSchema = Type.Record(Type.String(), Type.Any());
|
||||
|
||||
export const nodes = sqliteTable("nodes", {
|
||||
...commonCols,
|
||||
graphId: text("graph_id").notNull().references(() => graphs.id, { onDelete: "cascade" }),
|
||||
graphId: text("graph_id").notNull().references(() => graphs.id, {
|
||||
onDelete: "cascade",
|
||||
}),
|
||||
key: text("key").notNull(),
|
||||
attributes: text("attributes", { mode: "json" }).notNull().default({}),
|
||||
}, (table) => ({
|
||||
@@ -29,4 +31,4 @@ export const InsertNodeSchema = createInsertSchema(nodes, {
|
||||
attributes: AttributesSchema,
|
||||
});
|
||||
|
||||
export type InsertNode = Static<typeof InsertNodeSchema>;
|
||||
export type InsertNode = Static<typeof InsertNodeSchema>;
|
||||
|
||||
Reference in New Issue
Block a user