diff --git a/.prettierrc b/.prettierrc index 7ebb855..1b5c8a9 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,8 +1,14 @@ { "useTabs": true, "singleQuote": true, - "trailingComma": "none", + "trailingComma": "es5", "printWidth": 100, + "endOfLine": "lf", + "arrowParens": "always", + "jsxSingleQuote": false, + "semi": true, + "quoteProps": "as-needed", + "tabWidth": 4, "plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"], "overrides": [ { diff --git a/.storybook/main.js b/.storybook/main.js index 21b3818..5f0a59a 100644 --- a/.storybook/main.js +++ b/.storybook/main.js @@ -7,11 +7,11 @@ const config = { '@storybook/addon-interactions', '@storybook/addon-styling-webpack', '@storybook/addon-svelte-csf', - '@storybook/addon-themes' + '@storybook/addon-themes', ], framework: { name: '@storybook/sveltekit', - options: {} - } + options: {}, + }, }; -export default config; \ No newline at end of file +export default config; diff --git a/.storybook/preview.css b/.storybook/preview.css index 746f0f9..4e7ba75 100644 --- a/.storybook/preview.css +++ b/.storybook/preview.css @@ -1,4 +1,4 @@ @import 'tailwindcss/base'; @import 'tailwindcss/components'; @import 'tailwindcss/utilities'; -@import '@flaticon/flaticon-uicons/css/all/all'; \ No newline at end of file +@import '@flaticon/flaticon-uicons/css/all/all'; diff --git a/.storybook/preview.js b/.storybook/preview.js index 07ac09e..46d380c 100644 --- a/.storybook/preview.js +++ b/.storybook/preview.js @@ -8,21 +8,21 @@ const preview = { controls: { matchers: { color: /(background|color)$/i, - date: /Date$/i - } - } + date: /Date$/i, + }, + }, }, decorators: [ withThemeByDataAttribute({ themes: { light: 'light', dark: 'dark', - night: 'night' + night: 'night', }, defaultTheme: 'dark', - attributeName: 'data-theme' - }) - ] + attributeName: 'data-theme', + }), + ], }; -export default preview; \ No newline at end of file +export default preview; diff --git a/README.md b/README.md index bc8fc1c..6211c61 100644 --- a/README.md +++ b/README.md @@ -66,4 +66,4 @@ bun build You can preview the production build with `bun run preview`. -> To deploy your app, you may need to install an [adapter](https://svelte.dev/docs/kit/adapters) for your target environment. \ No newline at end of file +> To deploy your app, you may need to install an [adapter](https://svelte.dev/docs/kit/adapters) for your target environment. diff --git a/docs/DAISY.md b/docs/DAISY.md index 47728b9..1470054 100644 --- a/docs/DAISY.md +++ b/docs/DAISY.md @@ -1,3 +1,3 @@ # Experienced Issues -- https://github.com/saadeghi/daisyui/issues/811 \ No newline at end of file +- https://github.com/saadeghi/daisyui/issues/811 diff --git a/eslint.config.js b/eslint.config.js index aa5987f..5c68edc 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -18,17 +18,17 @@ export default ts.config( languageOptions: { globals: { ...globals.browser, - ...globals.node - } - } + ...globals.node, + }, + }, }, { files: ['**/*.svelte'], languageOptions: { parserOptions: { - parser: ts.parser - } - } + parser: ts.parser, + }, + }, } ); diff --git a/playwright.config.ts b/playwright.config.ts index d76ea26..07b7bd2 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -3,8 +3,8 @@ import { defineConfig } from '@playwright/test'; export default defineConfig({ webServer: { command: 'npm run build && npm run preview', - port: 4173 + port: 4173, }, - testDir: 'e2e' + testDir: 'e2e', }); diff --git a/postcss.config.js b/postcss.config.js index 0f77216..7b75c83 100644 --- a/postcss.config.js +++ b/postcss.config.js @@ -1,6 +1,6 @@ export default { plugins: { tailwindcss: {}, - autoprefixer: {} - } + autoprefixer: {}, + }, }; diff --git a/src/app.css b/src/app.css index f293a80..6a836a2 100644 --- a/src/app.css +++ b/src/app.css @@ -5,4 +5,4 @@ :root { @apply text-base-content; -} \ No newline at end of file +} diff --git a/src/app.d.ts b/src/app.d.ts index bb055d9..7cce717 100644 --- a/src/app.d.ts +++ b/src/app.d.ts @@ -2,10 +2,9 @@ // for information about these interfaces declare global { namespace App { - // interface Error {} interface Locals { - user: import("lucia").User | null; + user: import('lucia').User | null; session: import('lucia').Session | null; } // interface PageData {} diff --git a/src/lib/components/Navigation/Navbar/Navbar.stories.svelte b/src/lib/components/Navigation/Navbar/Navbar.stories.svelte index b377964..d9fa299 100644 --- a/src/lib/components/Navigation/Navbar/Navbar.stories.svelte +++ b/src/lib/components/Navigation/Navbar/Navbar.stories.svelte @@ -4,8 +4,8 @@ const { Story } = defineMeta({ title: 'Navigation/Navbar', - component: Navbar + component: Navbar, }); - \ No newline at end of file + diff --git a/src/lib/components/Navigation/Navbar/Navbar.svelte b/src/lib/components/Navigation/Navbar/Navbar.svelte index 1abf0ef..c16b463 100644 --- a/src/lib/components/Navigation/Navbar/Navbar.svelte +++ b/src/lib/components/Navigation/Navbar/Navbar.svelte @@ -9,4 +9,4 @@ \ No newline at end of file + diff --git a/src/lib/components/Navigation/Navbar/index.ts b/src/lib/components/Navigation/Navbar/index.ts index 3ae8c87..29b38de 100644 --- a/src/lib/components/Navigation/Navbar/index.ts +++ b/src/lib/components/Navigation/Navbar/index.ts @@ -1,3 +1,3 @@ import Navbar from './Navbar.svelte'; -export default Navbar; \ No newline at end of file +export default Navbar; diff --git a/src/lib/components/Navigation/Tabs/Tab.svelte b/src/lib/components/Navigation/Tabs/Tab.svelte index b466afb..a30a6ee 100644 --- a/src/lib/components/Navigation/Tabs/Tab.svelte +++ b/src/lib/components/Navigation/Tabs/Tab.svelte @@ -2,4 +2,4 @@ let { active, label, onclick } = $props(); - \ No newline at end of file + diff --git a/src/lib/components/Navigation/Tabs/Tabs.stories.svelte b/src/lib/components/Navigation/Tabs/Tabs.stories.svelte index ae5541e..828b063 100644 --- a/src/lib/components/Navigation/Tabs/Tabs.stories.svelte +++ b/src/lib/components/Navigation/Tabs/Tabs.stories.svelte @@ -10,13 +10,13 @@ argTypes: { size: { control: 'select', - options: ['xs', 'sm', 'rg', 'lg'] + options: ['xs', 'sm', 'rg', 'lg'], }, variant: { control: 'select', - options: ['none', 'bordered', 'lifted', 'boxed'] - } - } + options: ['none', 'bordered', 'lifted', 'boxed'], + }, + }, }); @@ -24,4 +24,4 @@ {/snippet} - \ No newline at end of file + diff --git a/src/lib/components/Navigation/Tabs/Tabs.svelte b/src/lib/components/Navigation/Tabs/Tabs.svelte index 3c897e8..a0a7e77 100644 --- a/src/lib/components/Navigation/Tabs/Tabs.svelte +++ b/src/lib/components/Navigation/Tabs/Tabs.svelte @@ -33,4 +33,4 @@ /> {/key} {/each} - \ No newline at end of file + diff --git a/src/lib/components/Navigation/Tabs/index.ts b/src/lib/components/Navigation/Tabs/index.ts index 5ef8a17..d4f7fd8 100644 --- a/src/lib/components/Navigation/Tabs/index.ts +++ b/src/lib/components/Navigation/Tabs/index.ts @@ -1,4 +1,4 @@ import Tabs from './Tabs.svelte'; export default Tabs; -export { default as Tabs } from './Tabs.svelte'; \ No newline at end of file +export { default as Tabs } from './Tabs.svelte'; diff --git a/src/lib/components/Navigation/index.ts b/src/lib/components/Navigation/index.ts index a970555..1c2df11 100644 --- a/src/lib/components/Navigation/index.ts +++ b/src/lib/components/Navigation/index.ts @@ -1,4 +1,4 @@ import Navbar from './Navbar'; import Tabs from './Tabs'; -export { Navbar, Tabs }; \ No newline at end of file +export { Navbar, Tabs }; diff --git a/src/lib/components/common/Button/Button.stories.svelte b/src/lib/components/common/Button/Button.stories.svelte index 23db95a..d182565 100644 --- a/src/lib/components/common/Button/Button.stories.svelte +++ b/src/lib/components/common/Button/Button.stories.svelte @@ -7,7 +7,7 @@ title: 'Actions/Button', component: Button, args: { - onClick: fn() + onClick: fn(), }, argTypes: { color: { @@ -22,23 +22,23 @@ 'info', 'success', 'warning', - 'error' - ] + 'error', + ], }, outline: { - control: 'boolean' + control: 'boolean', }, size: { control: 'select', options: ['Default', 'xs', 'sm', 'lg'], - defaultValue: 'Default' + defaultValue: 'Default', }, type: { control: 'select', - options: ['button', 'reset', 'submit'] - } - } + options: ['button', 'reset', 'submit'], + }, + }, }); - \ No newline at end of file + diff --git a/src/lib/components/common/Button/Button.svelte b/src/lib/components/common/Button/Button.svelte index 30a1cba..e7c4391 100644 --- a/src/lib/components/common/Button/Button.svelte +++ b/src/lib/components/common/Button/Button.svelte @@ -25,7 +25,7 @@ responsive = false, size, type = 'button', - wide = false + wide = false, }: Props = $props(); @@ -54,4 +54,4 @@ {label} - \ No newline at end of file + diff --git a/src/lib/components/common/Button/index.ts b/src/lib/components/common/Button/index.ts index f983577..14aed5d 100644 --- a/src/lib/components/common/Button/index.ts +++ b/src/lib/components/common/Button/index.ts @@ -1,3 +1,3 @@ import Button from './Button.svelte'; -export default Button; \ No newline at end of file +export default Button; diff --git a/src/lib/components/common/Loader/Loader.stories.svelte b/src/lib/components/common/Loader/Loader.stories.svelte index 8acaab7..226cba1 100644 --- a/src/lib/components/common/Loader/Loader.stories.svelte +++ b/src/lib/components/common/Loader/Loader.stories.svelte @@ -4,8 +4,8 @@ const { Story } = defineMeta({ title: 'Feedback/Loader', - component: Loader + component: Loader, }); - \ No newline at end of file + diff --git a/src/lib/components/common/Loader/Loader.svelte b/src/lib/components/common/Loader/Loader.svelte index b855fec..425d59e 100644 --- a/src/lib/components/common/Loader/Loader.svelte +++ b/src/lib/components/common/Loader/Loader.svelte @@ -48,4 +48,4 @@ transform: rotate(-360deg); } } - \ No newline at end of file + diff --git a/src/lib/components/common/Loader/index.ts b/src/lib/components/common/Loader/index.ts index fdaa01b..9623773 100644 --- a/src/lib/components/common/Loader/index.ts +++ b/src/lib/components/common/Loader/index.ts @@ -1,3 +1,3 @@ import Loader from './Loader.svelte'; -export default Loader; \ No newline at end of file +export default Loader; diff --git a/src/lib/components/common/TextInput/TextInput.stories.svelte b/src/lib/components/common/TextInput/TextInput.stories.svelte index 1fb5893..74eb578 100644 --- a/src/lib/components/common/TextInput/TextInput.stories.svelte +++ b/src/lib/components/common/TextInput/TextInput.stories.svelte @@ -17,22 +17,22 @@ 'info', 'success', 'warning', - 'error' - ] + 'error', + ], }, bordered: { - control: 'boolean' + control: 'boolean', }, size: { control: 'select', options: ['Default', 'xs', 'sm', 'lg'], - defaultValue: 'Default' + defaultValue: 'Default', }, type: { control: 'select', - options: ['email', 'password', 'search', 'tel', 'text', 'url'] - } - } + options: ['email', 'password', 'search', 'tel', 'text', 'url'], + }, + }, }); @@ -42,4 +42,4 @@ - \ No newline at end of file + diff --git a/src/lib/components/common/TextInput/TextInput.svelte b/src/lib/components/common/TextInput/TextInput.svelte index 50bfd05..affbd2c 100644 --- a/src/lib/components/common/TextInput/TextInput.svelte +++ b/src/lib/components/common/TextInput/TextInput.svelte @@ -30,7 +30,7 @@ name, placeholder, size, - type = 'text' + type = 'text', }: Props = $props(); @@ -65,4 +65,4 @@ \ No newline at end of file + diff --git a/src/lib/components/common/TextInput/index.ts b/src/lib/components/common/TextInput/index.ts index c2707e8..89470e9 100644 --- a/src/lib/components/common/TextInput/index.ts +++ b/src/lib/components/common/TextInput/index.ts @@ -1,3 +1,3 @@ import TextInput from './TextInput.svelte'; -export default TextInput; \ No newline at end of file +export default TextInput; diff --git a/src/lib/index.ts b/src/lib/index.ts index e5efcb2..aa2aa7e 100644 --- a/src/lib/index.ts +++ b/src/lib/index.ts @@ -1,2 +1,2 @@ // place files you want to import through the `$lib` alias in this folder. -export * from './components'; \ No newline at end of file +export * from './components'; diff --git a/src/lib/server/config/index.ts b/src/lib/server/config/index.ts index b7dcdbe..0239640 100644 --- a/src/lib/server/config/index.ts +++ b/src/lib/server/config/index.ts @@ -8,7 +8,7 @@ export interface Configuration { export const LoadConfig = (): Configuration => { const { success, data, error } = z .object({ - VITE_APP_VERSION: z.string().default('development') + VITE_APP_VERSION: z.string().default('development'), }) .safeParse(import.meta.env); @@ -17,8 +17,8 @@ export const LoadConfig = (): Configuration => { } return { - app_version: data!.VITE_APP_VERSION + app_version: data!.VITE_APP_VERSION, }; }; -export const Config = LoadConfig(); \ No newline at end of file +export const Config = LoadConfig(); diff --git a/src/lib/server/logger/index.ts b/src/lib/server/logger/index.ts index 38ed4aa..7dea51d 100644 --- a/src/lib/server/logger/index.ts +++ b/src/lib/server/logger/index.ts @@ -19,5 +19,5 @@ export const yogaLogger: YogaLogger = { error(...args) { // @ts-expect-error types dont match logger.error(...args); - } -}; \ No newline at end of file + }, +}; diff --git a/src/lib/server/lucia.ts b/src/lib/server/lucia.ts index ac99da9..be9c091 100644 --- a/src/lib/server/lucia.ts +++ b/src/lib/server/lucia.ts @@ -7,14 +7,14 @@ const adapter = new PrismaAdapter(prisma.session, prisma.user); export const auth = new Lucia(adapter, { sessionCookie: { attributes: { - secure: process.env.NODE_ENV === 'production' - } + secure: process.env.NODE_ENV === 'production', + }, }, getUserAttributes: (attributes) => { return { - email: attributes.email + email: attributes.email, }; - } + }, }); declare module 'lucia' { diff --git a/src/lib/server/pothos/builder.ts b/src/lib/server/pothos/builder.ts index 0b7fda4..15de43f 100644 --- a/src/lib/server/pothos/builder.ts +++ b/src/lib/server/pothos/builder.ts @@ -23,6 +23,6 @@ export const builder = new SchemaBuilder({ // use where clause from prismaRelatedConnection for totalCount (defaults to true) filterConnectionTotalCount: true, // warn when not using a query parameter correctly - onUnusedQuery: process.env.NODE_ENV === 'production' ? null : 'warn' - } -}); \ No newline at end of file + onUnusedQuery: process.env.NODE_ENV === 'production' ? null : 'warn', + }, +}); diff --git a/src/lib/server/pothos/index.ts b/src/lib/server/pothos/index.ts index 5d5aa13..e27a6e2 100644 --- a/src/lib/server/pothos/index.ts +++ b/src/lib/server/pothos/index.ts @@ -1 +1 @@ -export * from './schema'; \ No newline at end of file +export * from './schema'; diff --git a/src/lib/server/pothos/schema/Scalars/Date.ts b/src/lib/server/pothos/schema/Scalars/Date.ts index 6573f0a..7fe4322 100644 --- a/src/lib/server/pothos/schema/Scalars/Date.ts +++ b/src/lib/server/pothos/schema/Scalars/Date.ts @@ -10,5 +10,5 @@ export const DateScalar = builder.scalarType('Date', { throw new Error('Cyka blyat'); } return new Date(date); - } -}); \ No newline at end of file + }, +}); diff --git a/src/lib/server/pothos/schema/Scalars/index.ts b/src/lib/server/pothos/schema/Scalars/index.ts index 0751f41..337b487 100644 --- a/src/lib/server/pothos/schema/Scalars/index.ts +++ b/src/lib/server/pothos/schema/Scalars/index.ts @@ -5,4 +5,4 @@ export type Scalars = { Input: Date; Output: Date; }; -}; \ No newline at end of file +}; diff --git a/src/lib/server/pothos/schema/index.ts b/src/lib/server/pothos/schema/index.ts index acdab44..84e199f 100644 --- a/src/lib/server/pothos/schema/index.ts +++ b/src/lib/server/pothos/schema/index.ts @@ -5,7 +5,7 @@ builder.queryType({}); builder.queryField('version', (t) => t.string({ description: 'Application version', - resolve: (parent, args, context) => context.config.app_version + resolve: (parent, args, context) => context.config.app_version, }) ); @@ -15,4 +15,4 @@ import './Scalars'; import './posts'; import './users'; -export const Schema = builder.toSchema(); \ No newline at end of file +export const Schema = builder.toSchema(); diff --git a/src/lib/server/pothos/schema/posts.ts b/src/lib/server/pothos/schema/posts.ts index f616871..1885f06 100644 --- a/src/lib/server/pothos/schema/posts.ts +++ b/src/lib/server/pothos/schema/posts.ts @@ -9,39 +9,39 @@ export const Post = builder.prismaObject('Post', { published: t.exposeBoolean('published'), author: t.relation('author'), createdAt: t.expose('createdAt', { - type: 'Date' + type: 'Date', }), updatedAt: t.expose('updatedAt', { - type: 'Date' - }) - }) + type: 'Date', + }), + }), }); const CreatePost = builder.inputType('CreatePost', { fields: (t) => ({ title: t.string({ - required: true + required: true, }), content: t.string({ - required: true + required: true, }), published: t.boolean(), authorId: t.id({ - required: true - }) - }) + required: true, + }), + }), }); const UpdatePost = builder.inputType('UpdatePost', { fields: (t) => ({ id: t.id({ - required: true + required: true, }), title: t.string(), content: t.string(), published: t.boolean(), - authorId: t.id() - }) + authorId: t.id(), + }), }); builder.queryFields((t) => ({ @@ -49,19 +49,19 @@ builder.queryFields((t) => ({ type: [Post], resolve: async () => { return await prisma.post.findMany(); - } - }) + }, + }), })); builder.mutationFields((t) => ({ createPost: t.field({ type: Post, args: { - input: t.arg({ required: true, type: CreatePost }) + input: t.arg({ required: true, type: CreatePost }), }, resolve: async (parent, args) => { const author = await prisma.user.findUnique({ - where: { id: Number(args.input.authorId) } + where: { id: Number(args.input.authorId) }, }); if (!author) { throw new Error('Author does not exist!'); @@ -73,23 +73,23 @@ builder.mutationFields((t) => ({ published: args.input.published, author: { connect: { - id: author.id - } - } - } + id: author.id, + }, + }, + }, }); return post; - } + }, }), updatePost: t.field({ type: Post, args: { - input: t.arg({ required: true, type: UpdatePost }) + input: t.arg({ required: true, type: UpdatePost }), }, resolve: async (parent, args) => { const post = await prisma.post.update({ where: { - id: Number(args.input.id) + id: Number(args.input.id), }, data: { title: args.input.title ?? undefined, @@ -98,13 +98,13 @@ builder.mutationFields((t) => ({ ...(args.input.authorId && { author: { connect: { - id: Number(args.input.authorId) - } - } - }) - } + id: Number(args.input.authorId), + }, + }, + }), + }, }); return post; - } - }) -})); \ No newline at end of file + }, + }), +})); diff --git a/src/lib/server/pothos/schema/users.ts b/src/lib/server/pothos/schema/users.ts index c15b8bb..210ad57 100644 --- a/src/lib/server/pothos/schema/users.ts +++ b/src/lib/server/pothos/schema/users.ts @@ -8,33 +8,33 @@ export const User = builder.prismaObject('User', { name: t.exposeString('name'), posts: t.relation('posts'), createdAt: t.expose('createdAt', { - type: 'Date' + type: 'Date', }), updatedAt: t.expose('updatedAt', { - type: 'Date' - }) - }) + type: 'Date', + }), + }), }); const CreateUser = builder.inputType('CreateUser', { fields: (t) => ({ email: t.string({ - required: true + required: true, }), name: t.string({ - required: true - }) - }) + required: true, + }), + }), }); const UpdateUser = builder.inputType('UpdateUser', { fields: (t) => ({ id: t.id({ - required: true + required: true, }), email: t.string(), - name: t.string() - }) + name: t.string(), + }), }); builder.queryFields((t) => ({ @@ -42,42 +42,42 @@ builder.queryFields((t) => ({ type: [User], resolve: async () => { return await prisma.user.findMany(); - } - }) + }, + }), })); builder.mutationFields((t) => ({ createUser: t.field({ type: User, args: { - input: t.arg({ required: true, type: CreateUser }) + input: t.arg({ required: true, type: CreateUser }), }, resolve: async (parent, args) => { const post = await prisma.user.create({ data: { email: args.input.email, - name: args.input.name - } + name: args.input.name, + }, }); return post; - } + }, }), updateUser: t.field({ type: User, args: { - input: t.arg({ required: true, type: UpdateUser }) + input: t.arg({ required: true, type: UpdateUser }), }, resolve: async (parent, args) => { const post = await prisma.user.update({ where: { - id: Number(args.input.id) + id: Number(args.input.id), }, data: { email: args.input.email, - name: args.input.name ?? undefined - } + name: args.input.name ?? undefined, + }, }); return post; - } - }) -})); \ No newline at end of file + }, + }), +})); diff --git a/src/lib/server/prisma/index.ts b/src/lib/server/prisma/index.ts index fbb7b51..9b6c4ce 100644 --- a/src/lib/server/prisma/index.ts +++ b/src/lib/server/prisma/index.ts @@ -1,3 +1,3 @@ import { PrismaClient } from '@prisma/client'; -export const prisma = new PrismaClient(); \ No newline at end of file +export const prisma = new PrismaClient(); diff --git a/src/lib/server/yoga/context.ts b/src/lib/server/yoga/context.ts index 8a3ab51..e7eff70 100644 --- a/src/lib/server/yoga/context.ts +++ b/src/lib/server/yoga/context.ts @@ -3,5 +3,5 @@ import type { YogaInitialContext } from 'graphql-yoga'; export const Context = (initialContext: YogaInitialContext) => ({ ...initialContext, - config: Config -}); \ No newline at end of file + config: Config, +}); diff --git a/src/lib/server/yoga/index.ts b/src/lib/server/yoga/index.ts index b489ffb..8e2b5fb 100644 --- a/src/lib/server/yoga/index.ts +++ b/src/lib/server/yoga/index.ts @@ -1,2 +1,2 @@ export * from './context'; -export * from './server'; \ No newline at end of file +export * from './server'; diff --git a/src/lib/server/yoga/server.ts b/src/lib/server/yoga/server.ts index 4bdfbe6..aa17066 100644 --- a/src/lib/server/yoga/server.ts +++ b/src/lib/server/yoga/server.ts @@ -10,5 +10,5 @@ export const Yoga = createYoga({ graphqlEndpoint: '/api/graphql', // Let Yoga use sveltekit's Response object fetchAPI: { Response }, - logging: yogaLogger -}); \ No newline at end of file + logging: yogaLogger, +}); diff --git a/src/lib/types/daisy-colors.ts b/src/lib/types/daisy-colors.ts index c5d5a56..e8c5062 100644 --- a/src/lib/types/daisy-colors.ts +++ b/src/lib/types/daisy-colors.ts @@ -9,4 +9,4 @@ export type DaisyColor = | 'info' | 'success' | 'warning' - | 'error'; \ No newline at end of file + | 'error'; diff --git a/src/lib/types/daisy-sizes.ts b/src/lib/types/daisy-sizes.ts index 9cd1207..87421d4 100644 --- a/src/lib/types/daisy-sizes.ts +++ b/src/lib/types/daisy-sizes.ts @@ -1 +1 @@ -export type DaisySize = 'xs' | 'sm' | 'lg'; \ No newline at end of file +export type DaisySize = 'xs' | 'sm' | 'lg'; diff --git a/src/lib/types/index.ts b/src/lib/types/index.ts index 93ffa73..282f9e4 100644 --- a/src/lib/types/index.ts +++ b/src/lib/types/index.ts @@ -1,2 +1,2 @@ export * from './daisy-colors'; -export * from './daisy-sizes'; \ No newline at end of file +export * from './daisy-sizes'; diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 7725dd4..ae9ad12 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -11,4 +11,4 @@ .layout { @apply h-screen w-screen bg-base-100; } - \ No newline at end of file + diff --git a/src/routes/+page.server.ts b/src/routes/+page.server.ts index 3e2a230..bdfb4d6 100644 --- a/src/routes/+page.server.ts +++ b/src/routes/+page.server.ts @@ -3,15 +3,15 @@ export async function load(event) { const userId = event.cookies.get('user'); if (!userId) { return { - authenticated: false + authenticated: false, }; } const user = await prisma.user.findUnique({ where: { - id: userId - } + id: userId, + }, }); return { - authenticated: !!user + authenticated: !!user, }; } diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 42c1ebf..e3c9a34 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -21,4 +21,4 @@ .site-loader { @apply flex h-screen w-screen flex-col items-center justify-center gap-6; } - \ No newline at end of file + diff --git a/src/routes/api/graphql/+server.ts b/src/routes/api/graphql/+server.ts index c208143..e1eead7 100644 --- a/src/routes/api/graphql/+server.ts +++ b/src/routes/api/graphql/+server.ts @@ -1,3 +1,3 @@ import { Yoga } from '$lib/server/yoga'; -export { Yoga as GET, Yoga as POST }; \ No newline at end of file +export { Yoga as GET, Yoga as POST }; diff --git a/src/routes/app/+layout.svelte b/src/routes/app/+layout.svelte index 3e0b9dd..c14e9a4 100644 --- a/src/routes/app/+layout.svelte +++ b/src/routes/app/+layout.svelte @@ -5,4 +5,4 @@ -{@render children()} \ No newline at end of file +{@render children()} diff --git a/src/routes/login/+page.server.ts b/src/routes/login/+page.server.ts index dc69fae..0fea32f 100644 --- a/src/routes/login/+page.server.ts +++ b/src/routes/login/+page.server.ts @@ -12,8 +12,8 @@ export const actions = { } const user = await prisma.user.findUnique({ where: { - email: form.get('email') as string - } + email: form.get('email') as string, + }, }); if (!user) { logger.error('User not found! ${user}'); @@ -31,7 +31,7 @@ export const actions = { const sessionCookie = auth.createSessionCookie(session.id); event.cookies.set(sessionCookie.name, sessionCookie.value, { path: '/', - maxAge: 120 + maxAge: 120, }); redirect(302, '/'); }, @@ -47,8 +47,8 @@ export const actions = { data: { email: form.get('email') as string, name: form.get('name') as string, - password: hashedPassword - } + password: hashedPassword, + }, }); const session = await auth.createSession(user.id.toString(), {}); const sessionCookie = auth.createSessionCookie(session.id); @@ -57,8 +57,8 @@ export const actions = { } event.cookies.set(sessionCookie.name, sessionCookie.value, { path: '/', - maxAge: 120 + maxAge: 120, }); redirect(302, '/'); - } + }, } satisfies Actions; diff --git a/src/routes/login/+page.svelte b/src/routes/login/+page.svelte index b72fefd..f32bb29 100644 --- a/src/routes/login/+page.svelte +++ b/src/routes/login/+page.svelte @@ -23,7 +23,12 @@
- + {#if variant === 'register'} {/if} @@ -47,4 +52,4 @@ .page { @apply flex flex-col items-center justify-around gap-24 py-[10%]; } - \ No newline at end of file + diff --git a/svelte.config.js b/svelte.config.js index 1295460..3ad145a 100644 --- a/svelte.config.js +++ b/svelte.config.js @@ -11,8 +11,8 @@ const config = { // adapter-auto only supports some environments, see https://svelte.dev/docs/kit/adapter-auto for a list. // If your environment is not supported, or you settled on a specific environment, switch out the adapter. // See https://svelte.dev/docs/kit/adapters for more information about adapters. - adapter: adapter() - } + adapter: adapter(), + }, }; export default config; diff --git a/tailwind.config.ts b/tailwind.config.ts index 065ea6d..0ad0c33 100644 --- a/tailwind.config.ts +++ b/tailwind.config.ts @@ -8,22 +8,22 @@ export default { theme: { extend: { fontFamily: { - display: ['Baskervville SC'] + display: ['Baskervville SC'], }, animation: { - fade: 'fadeIn .5s ease-in-out' + fade: 'fadeIn .5s ease-in-out', }, keyframes: { fadeIn: { from: { opacity: '0' }, - to: { opacity: '1' } - } - } - } + to: { opacity: '1' }, + }, + }, + }, }, plugins: [typography, daisyui], daisyui: { - logs: false - } -} satisfies Config; \ No newline at end of file + logs: false, + }, +} satisfies Config; diff --git a/vite.config.ts b/vite.config.ts index d76fc8a..40e6b52 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -5,6 +5,6 @@ export default defineConfig({ plugins: [sveltekit()], test: { - include: ['src/**/*.{test,spec}.{js,ts}'] - } + include: ['src/**/*.{test,spec}.{js,ts}'], + }, });