Skip to content

Commit

Permalink
fix: prettier formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
ixahmedxi committed Jun 18, 2024
1 parent 9418f03 commit 8497e14
Show file tree
Hide file tree
Showing 254 changed files with 2,982 additions and 2,979 deletions.
20 changes: 10 additions & 10 deletions .commitlintrc.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getWorkspacePackageNames } from './scripts/utils';
import { getWorkspacePackageNames } from './scripts/utils'

// ------------------------------------------------------------------

Expand All @@ -15,7 +15,7 @@ import { getWorkspacePackageNames } from './scripts/utils';
// ------------------------------------------------------------------

interface Context {
cwd?: string;
cwd?: string
}

// ------------------------------------------------------------------
Expand All @@ -26,24 +26,24 @@ interface Context {
* @returns An array of all projects in the workspace
*/
function getProjects(context?: Context): string[] {
const ctx = context ?? {};
const cwd = ctx.cwd ?? process.cwd();
const ctx = context ?? {}
const cwd = ctx.cwd ?? process.cwd()

return getWorkspacePackageNames(cwd)
.reduce((projects: string[], name) => {
if (name.startsWith('@')) {
const project = name.split('/')[1];
const project = name.split('/')[1]

if (typeof project === 'string') {
projects.push(project);
projects.push(project)
}

projects.push(name);
projects.push(name)
}

return projects;
return projects
}, [])
.sort();
.sort()
}

// We are exporting a custom commitlint configuration
Expand All @@ -53,4 +53,4 @@ export default {
rules: {
'scope-enum': (ctx: Context) => [2, 'always', getProjects(ctx)],
},
};
}
4 changes: 2 additions & 2 deletions apps/docs/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ OrbitKit currently ships with two authentication providers, Google and Github. Y
</Note>

<AccordionGroup>
<Accordion title="Configuring Github OAuth" icon="github">
<Accordion title='Configuring Github OAuth' icon='github'>
<ol>
<li>Go to your Github Settings.</li>
<li>Go to Developer Settings.</li>
Expand All @@ -153,7 +153,7 @@ OrbitKit currently ships with two authentication providers, Google and Github. Y
</li>
</ol>
</Accordion>
<Accordion title="Configuring Google OAuth" icon="google">
<Accordion title='Configuring Google OAuth' icon='google'>
<ol>
<li>Go to the Google Cloud Console.</li>
<li>Create a new project.</li>
Expand Down
12 changes: 6 additions & 6 deletions apps/docs/introduction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ description: '🚀 OrbitKit is an enterprise ready monorepo StarterKit ready to
---

<img
className="block dark:hidden"
src="/images/orbitkit-hero-light.svg"
alt="Hero Light"
className='block dark:hidden'
src='/images/orbitkit-hero-light.svg'
alt='Hero Light'
/>
<img
className="hidden dark:block"
src="/images/orbitkit-hero-dark.svg"
alt="Hero Dark"
className='hidden dark:block'
src='/images/orbitkit-hero-dark.svg'
alt='Hero Dark'
/>

**OrbitKit** is not like any starterkit, it's built for **startups** & **big projects** alike, leveraging the newest technologies in a **monorepo codebase** to deliver a starterkit that scales with your business **from the start**.
Expand Down
8 changes: 4 additions & 4 deletions apps/docs/technologies/playwright.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ To write tests, you can create a new file in the `e2e` directory of the applicat
Here is an example of a test file:

```typescript
import { expect, test } from '@playwright/test';
import { expect, test } from '@playwright/test'

test('has title', async ({ page }) => {
await page.goto('/');
await page.goto('/')

await expect(page.getByText(/astro website/i)).toBeVisible();
});
await expect(page.getByText(/astro website/i)).toBeVisible()
})
```

## CI setup
Expand Down
12 changes: 6 additions & 6 deletions apps/marketing/astro.config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import mdx from '@astrojs/mdx';
import react from '@astrojs/react';
import sitemap from '@astrojs/sitemap';
import tailwind from '@astrojs/tailwind';
import { defineConfig } from 'astro/config';
import mdx from '@astrojs/mdx'
import react from '@astrojs/react'
import sitemap from '@astrojs/sitemap'
import tailwind from '@astrojs/tailwind'
import { defineConfig } from 'astro/config'

// https://astro.build/config
export default defineConfig({
Expand All @@ -13,4 +13,4 @@ export default defineConfig({
tailwind({ applyBaseStyles: false }),
react(),
],
});
})
8 changes: 4 additions & 4 deletions apps/marketing/e2e/example.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { expect, test } from '@playwright/test';
import { expect, test } from '@playwright/test'

test('has title', async ({ page }) => {
await page.goto('/');
await page.goto('/')

await expect(page.getByText(/astro website/i)).toBeVisible();
});
await expect(page.getByText(/astro website/i)).toBeVisible()
})
4 changes: 2 additions & 2 deletions apps/marketing/eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { configs, defineConfig } from '@orbitkit/eslint';
import { configs, defineConfig } from '@orbitkit/eslint'

export default defineConfig(
...configs.base,
Expand All @@ -12,4 +12,4 @@ export default defineConfig(
},
},
},
);
)
8 changes: 4 additions & 4 deletions apps/marketing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@
"@orbitkit/ui": "workspace:^",
"@t3-oss/env-core": "^0.10.1",
"@total-typescript/ts-reset": "^0.5.1",
"astro": "^4.10.2",
"astro": "^4.10.3",
"posthog-js": "^1.139.2",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"zod": "^3.23.8"
},
"devDependencies": {
"@astrojs/check": "^0.7.0",
"@astrojs/mdx": "^3.1.0",
"@astrojs/react": "^3.5.0",
"@astrojs/sitemap": "^3.1.5",
"@astrojs/mdx": "^3.1.1",
"@astrojs/react": "^3.6.0",
"@astrojs/sitemap": "^3.1.6",
"@astrojs/tailwind": "^5.1.0",
"@orbitkit/eslint": "workspace:^",
"@orbitkit/tailwind": "workspace:^",
Expand Down
8 changes: 4 additions & 4 deletions apps/marketing/playwright.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { defineConfig, devices } from '@playwright/test';
import * as dotenv from 'dotenv';
import { defineConfig, devices } from '@playwright/test'
import * as dotenv from 'dotenv'

dotenv.config({ path: './env.local' });
dotenv.config({ path: './env.local' })

export default defineConfig({
testDir: './e2e',
Expand Down Expand Up @@ -33,4 +33,4 @@ export default defineConfig({
url: 'http://localhost:4321',
reuseExistingServer: !process.env['CI'],
},
});
})
2 changes: 1 addition & 1 deletion apps/marketing/postcss.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ module.exports = {
tailwindcss: {},
autoprefixer: {},
},
};
}
2 changes: 1 addition & 1 deletion apps/marketing/reset.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import '@total-typescript/ts-reset';
import '@total-typescript/ts-reset'
72 changes: 36 additions & 36 deletions apps/marketing/src/components/BaseHead.astro
Original file line number Diff line number Diff line change
@@ -1,75 +1,75 @@
---
import '@orbitkit/assets/fonts/stylesheet.css';
import '@/styles/globals.css';
import '@orbitkit/assets/fonts/stylesheet.css'
import '@/styles/globals.css'
import GeistMono from '@orbitkit/assets/fonts/GeistMonoVariable.ttf';
import GeistSans from '@orbitkit/assets/fonts/GeistVariable.ttf';
import GeistMono from '@orbitkit/assets/fonts/GeistMonoVariable.ttf'
import GeistSans from '@orbitkit/assets/fonts/GeistVariable.ttf'
import { consts } from '@/consts';
import { consts } from '@/consts'
interface Props {
title?: string;
description?: string;
image?: string;
title?: string
description?: string
image?: string
}
const canonicalURL = new URL(Astro.url.pathname, Astro.site);
const canonicalURL = new URL(Astro.url.pathname, Astro.site)
const {
title = consts.site.title,
description = consts.site.description,
image = consts.site.previewImage,
} = Astro.props;
} = Astro.props
---

<!-- Global Metadata -->
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<meta name="generator" content={Astro.generator} />
<meta charset='utf-8' />
<meta name='viewport' content='width=device-width,initial-scale=1' />
<link rel='icon' type='image/svg+xml' href='/favicon.svg' />
<meta name='generator' content={Astro.generator} />

<!-- Font preloads -->
<link rel="preload" href={GeistSans} as="font" type="font/ttf" crossorigin />
<link rel="preload" href={GeistMono} as="font" type="font/ttf" crossorigin />
<link rel='preload' href={GeistSans} as='font' type='font/ttf' crossorigin />
<link rel='preload' href={GeistMono} as='font' type='font/ttf' crossorigin />

<!-- Canonical URL -->
<link rel="canonical" href={canonicalURL} />
<link rel='canonical' href={canonicalURL} />

<!-- Primary Meta Tags -->
<title>{title}</title>
<meta name="title" content={title} />
<meta name="description" content={description} />
<meta name='title' content={title} />
<meta name='description' content={description} />

<!-- Open Graph / Facebook -->
<meta property="og:type" content="website" />
<meta property="og:url" content={Astro.url} />
<meta property="og:title" content={title} />
<meta property="og:description" content={description} />
<meta property="og:image" content={new URL(image, Astro.url)} />
<meta property='og:type' content='website' />
<meta property='og:url' content={Astro.url} />
<meta property='og:title' content={title} />
<meta property='og:description' content={description} />
<meta property='og:image' content={new URL(image, Astro.url)} />

<!-- Twitter -->
<meta property="twitter:card" content="summary_large_image" />
<meta property="twitter:url" content={Astro.url} />
<meta property="twitter:title" content={title} />
<meta property="twitter:description" content={description} />
<meta property="twitter:image" content={new URL(image, Astro.url)} />
<meta property='twitter:card' content='summary_large_image' />
<meta property='twitter:url' content={Astro.url} />
<meta property='twitter:title' content={title} />
<meta property='twitter:description' content={description} />
<meta property='twitter:image' content={new URL(image, Astro.url)} />

<script is:inline>
const theme = (() => {
if (typeof localStorage !== 'undefined' && localStorage.getItem('theme')) {
return localStorage.getItem('theme') || '';
return localStorage.getItem('theme') || ''
}
if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
return 'dark';
return 'dark'
}
return 'light';
})();
return 'light'
})()

if (theme === 'light') {
document.documentElement.classList.remove('dark');
document.documentElement.classList.remove('dark')
} else {
document.documentElement.classList.add('dark');
document.documentElement.classList.add('dark')
}

window.localStorage.setItem('theme', theme);
window.localStorage.setItem('theme', theme)
</script>
4 changes: 2 additions & 2 deletions apps/marketing/src/components/FormattedDate.astro
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
interface Props {
date: Date;
date: Date
}
const { date } = Astro.props;
const { date } = Astro.props
---

<time datetime={date.toISOString()}>
Expand Down
8 changes: 4 additions & 4 deletions apps/marketing/src/components/avatar.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Avatar, AvatarFallback, AvatarImage } from '@orbitkit/ui/avatar';
import { Avatar, AvatarFallback, AvatarImage } from '@orbitkit/ui/avatar'

export const MyAvatar = () => {
return (
<Avatar>
<AvatarImage src="https://github.com/shadcn.png" alt="@shadcn" />
<AvatarImage src='https://github.com/shadcn.png' alt='@shadcn' />
<AvatarFallback>CN</AvatarFallback>
</Avatar>
);
};
)
}
2 changes: 1 addition & 1 deletion apps/marketing/src/components/posthog/PostHog.astro
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<script src="./posthog.ts"></script>
<script src='./posthog.ts'></script>
7 changes: 4 additions & 3 deletions apps/marketing/src/components/posthog/posthog.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { env } from '@orbitkit/env/marketing';
import posthog from 'posthog-js';
import posthog from 'posthog-js'

import { env } from '@orbitkit/env/marketing'

if (env.PUBLIC_POSTHOG_KEY && env.PUBLIC_POSTHOG_HOST) {
posthog.init(env.PUBLIC_POSTHOG_KEY, {
api_host: env.PUBLIC_POSTHOG_HOST,
});
})
}
2 changes: 1 addition & 1 deletion apps/marketing/src/consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ export const consts = {
'Orbitkit is a SaaS Monorepo StarterKit for startups and enterprises. It includes a Next.js web application, Astrojs marketing website and much more.',
previewImage: '/images/preview.png',
},
};
}
6 changes: 3 additions & 3 deletions apps/marketing/src/content/config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineCollection, z } from 'astro:content';
import { defineCollection, z } from 'astro:content'

const blog = defineCollection({
type: 'content',
Expand All @@ -9,6 +9,6 @@ const blog = defineCollection({
updatedDate: z.coerce.date().optional(),
heroImage: z.string().optional(),
}),
});
})

export const collections = { blog };
export const collections = { blog }
Loading

0 comments on commit 8497e14

Please sign in to comment.