diff --git a/.vscode/settings.json b/.vscode/settings.json index 35aabda..25fa621 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,4 +1,3 @@ -// .vscode/settings.json { "typescript.tsdk": "node_modules/typescript/lib" } diff --git a/bun.lockb b/bun.lockb index 380842b..1f9449b 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index caa1c05..c4f34e5 100644 --- a/package.json +++ b/package.json @@ -16,10 +16,13 @@ "reset-cache": "rm -rf /home/whatplan/.bun/install/cache && rm -rf node_modules && bun i" }, "devDependencies": { + "@ianvs/prettier-plugin-sort-imports": "^4.1.0", "@kitajs/ts-html-plugin": "^1.0.1", "bun-types": "latest", "concurrently": "^8.2.1", "drizzle-kit": "^0.19.13", + "prettier": "^3.0.3", + "prettier-plugin-tailwindcss": "^0.5.4", "typescript": "^5.2.2", "unocss": "^0.55.7" }, diff --git a/prettier.config.cjs b/prettier.config.cjs new file mode 100644 index 0000000..74e9d1f --- /dev/null +++ b/prettier.config.cjs @@ -0,0 +1,17 @@ +/** @typedef {import("prettier").Config} PrettierConfig */ + +/** @type { PrettierConfig | SortImportsConfig } */ +const config = { + arrowParens: "always", + printWidth: 80, + singleQuote: false, + semi: true, + trailingComma: "all", + tabWidth: 2, + plugins: [ + "@ianvs/prettier-plugin-sort-imports", + "prettier-plugin-tailwindcss", + ], +}; + +module.exports = config; diff --git a/src/auth/index.ts b/src/auth/index.ts index 7a35f2c..f141c34 100644 --- a/src/auth/index.ts +++ b/src/auth/index.ts @@ -1,6 +1,6 @@ +import { libsql } from "@lucia-auth/adapter-sqlite"; import { lucia } from "lucia"; import { web } from "lucia/middleware"; -import { libsql } from "@lucia-auth/adapter-sqlite"; import { config } from "../config"; import { client } from "../db"; diff --git a/src/components/base.tsx b/src/components/base.tsx index 660adaf..2fe87c4 100644 --- a/src/components/base.tsx +++ b/src/components/base.tsx @@ -1,6 +1,6 @@ -import { type PropsWithChildren } from "beth-stack/jsx"; -import { liveReloadScript } from "beth-stack/dev"; import { htmxExtensionScript } from "beth-stack"; +import { liveReloadScript } from "beth-stack/dev"; +import { type PropsWithChildren } from "beth-stack/jsx"; import { config } from "../config"; const safeScript = diff --git a/src/components/todos.tsx b/src/components/todos.tsx index 993a2ae..a8ba5de 100644 --- a/src/components/todos.tsx +++ b/src/components/todos.tsx @@ -10,6 +10,7 @@ export function TodoItem({ content, completed, id }: Todo) { hx-post={`/api/todos/toggle/${id}`} hx-swap="outerHTML" hx-target="closest div" + class="p4 pt-2" />