Skip to content

Commit 424ef46

Browse files
committed
style: format
1 parent d2a502d commit 424ef46

File tree

100 files changed

+12843
-13457
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+12843
-13457
lines changed

.prettierrc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,8 @@
22
"useTabs": true,
33
"singleQuote": true,
44
"trailingComma": "none",
5-
"printWidth": 100
5+
"printWidth": 100,
6+
"plugins": ["prettier-plugin-svelte"],
7+
"pluginSearchDirs": ["."],
8+
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
69
}

apps/events/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,9 @@ To contribute, talk to an ASU officer so the technical director can add you as a
2828

2929
**Server:** tRPC, NextJS, MySQL(PlanetScale)
3030

31-
3231
### Setting up Apple Wallet generation
3332

34-
*Adapted from https://github.com/alexandercerutti/passkit-generator/wiki/Generating-Certificates and https://developer.apple.com/documentation/walletpasses/building_a_pass.*
33+
_Adapted from https://github.com/alexandercerutti/passkit-generator/wiki/Generating-Certificates and https://developer.apple.com/documentation/walletpasses/building_a_pass._
3534

3635
**Note:** These commands were run successfully on a macOS system but should work correctly under any Unix-based system with the `base64` and `openssl` utilities available. On Windows, it will be **easiest to use Git Bash** (bundled with the [Windows installer for Git](https://git-scm.com/download/win)) as it includes all the necessary utilities.
3736

@@ -42,6 +41,7 @@ When following the steps in the above guide, skip any step that mentions downloa
4241
Set the `APPLE_TICKET_PASS_TYPE_IDENTIFIER` environment variable in `.env` to the pass type identifier (example: `pass.com.mycompany.event`) you set up in the Apple Developer Portal.
4342

4443
#### Last steps: macOS
44+
4545
At this point, you should have these files and passwords created:
4646

4747
- `signerCert.pem`
@@ -54,9 +54,10 @@ At this point, you should have these files and passwords created:
5454
- Set the `APPLE_PASS_PRIVATE_KEY` environment variable in `.env` to this output.
5555
- passphrase for `signerKey.pem`
5656
- Set the `APPLE_PASS_PRIVATE_KEY_PASSPHRASE` environment variable in `.env` to the - passphrase for `signerKey.pem`
57-
.
57+
.
5858

5959
#### Last steps: Other platforms
60+
6061
At this point, you should have these files created:
6162

6263
- `<your-key-name>.key`
@@ -65,4 +66,3 @@ At this point, you should have these files created:
6566
- `signerCert.pem`
6667
- Run `base64 -i signerCert.pem -o -`.
6768
- Set the `APPLE_PASS_CERTIFICATE` environment variable in `.env` to this output.
68-

apps/events/next.config.mjs

Lines changed: 33 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {withSentryConfig} from '@sentry/nextjs';
1+
import { withSentryConfig } from '@sentry/nextjs';
22
// @ts-check
33
import { env } from './src/env/server.mjs';
44

@@ -14,44 +14,50 @@ function defineNextConfig(config) {
1414
return config;
1515
}
1616

17-
export default withSentryConfig(defineNextConfig({
18-
reactStrictMode: true,
19-
swcMinify: true,
20-
images: {
21-
domains: ['lh3.googleusercontent.com', 'pbs.twimg.com', 'ucarecdn.com', 'fastly.picsum.photos']
22-
},
23-
// Next.js i18n docs: https://nextjs.org/docs/advanced-features/i18n-routing
24-
i18n: {
17+
export default withSentryConfig(
18+
defineNextConfig({
19+
reactStrictMode: true,
20+
swcMinify: true,
21+
images: {
22+
domains: [
23+
'lh3.googleusercontent.com',
24+
'pbs.twimg.com',
25+
'ucarecdn.com',
26+
'fastly.picsum.photos'
27+
]
28+
},
29+
// Next.js i18n docs: https://nextjs.org/docs/advanced-features/i18n-routing
30+
i18n: {
2531
locales: ['en'],
2632
defaultLocale: 'en'
27-
}
28-
}),
33+
}
34+
}),
2935
{
3036
// For all available options, see:
3137
// https://github.com/getsentry/sentry-webpack-plugin#options
3238

3339
// Suppresses source map uploading logs during build
3440
silent: true,
35-
org: "asu-utd",
36-
project: "kazala",
37-
},
41+
org: 'asu-utd',
42+
project: 'kazala'
43+
},
3844
{
39-
// For all available options, see:
40-
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/
45+
// For all available options, see:
46+
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/
4147

42-
// Upload a larger set of source maps for prettier stack traces (increases build time)
43-
widenClientFileUpload: true,
48+
// Upload a larger set of source maps for prettier stack traces (increases build time)
49+
widenClientFileUpload: true,
4450

45-
// Transpiles SDK to be compatible with IE11 (increases bundle size)
46-
transpileClientSDK: true,
51+
// Transpiles SDK to be compatible with IE11 (increases bundle size)
52+
transpileClientSDK: true,
4753

48-
// Routes browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers (increases server load)
49-
tunnelRoute: "/monitoring",
54+
// Routes browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers (increases server load)
55+
tunnelRoute: '/monitoring',
5056

51-
// Hides source maps from generated client bundles
52-
hideSourceMaps: true,
57+
// Hides source maps from generated client bundles
58+
hideSourceMaps: true,
5359

54-
// Automatically tree-shake Sentry logger statements to reduce bundle size
55-
disableLogger: true,
60+
// Automatically tree-shake Sentry logger statements to reduce bundle size
61+
disableLogger: true
5662
}
57-
);
63+
);

apps/events/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"db:generate": "prisma generate",
99
"db:push": "prisma db push",
1010
"lint": "next lint",
11+
"lint:fix": "next lint --fix",
1112
"start": "next start"
1213
},
1314
"dependencies": {

apps/events/postcss.config.cjs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module.exports = {
2-
plugins: {
3-
tailwindcss: {},
4-
autoprefixer: {},
5-
},
2+
plugins: {
3+
tailwindcss: {},
4+
autoprefixer: {}
5+
}
66
};

apps/events/sentry.client.config.ts

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,28 @@
22
// The config you add here will be used whenever a users loads a page in their browser.
33
// https://docs.sentry.io/platforms/javascript/guides/nextjs/
44

5-
import * as Sentry from "@sentry/nextjs";
5+
import * as Sentry from '@sentry/nextjs';
66

77
Sentry.init({
8-
dsn: "https://2443816b47614d33b0de9828382c2e0a@o4506108287320064.ingest.sentry.io/4506108297150464",
8+
dsn: 'https://2443816b47614d33b0de9828382c2e0a@o4506108287320064.ingest.sentry.io/4506108297150464',
99

10-
// Adjust this value in production, or use tracesSampler for greater control
11-
tracesSampleRate: 1,
10+
// Adjust this value in production, or use tracesSampler for greater control
11+
tracesSampleRate: 1,
1212

13-
// Setting this option to true will print useful information to the console while you're setting up Sentry.
14-
debug: false,
13+
// Setting this option to true will print useful information to the console while you're setting up Sentry.
14+
debug: false,
1515

16-
replaysOnErrorSampleRate: 1.0,
16+
replaysOnErrorSampleRate: 1.0,
1717

18-
// This sets the sample rate to be 10%. You may want this to be 100% while
19-
// in development and sample at a lower rate in production
20-
replaysSessionSampleRate: 0.1,
18+
// This sets the sample rate to be 10%. You may want this to be 100% while
19+
// in development and sample at a lower rate in production
20+
replaysSessionSampleRate: 0.1,
2121

22-
// You can remove this option if you're not planning to use the Sentry Session Replay feature:
23-
integrations: [
24-
new Sentry.Replay({
25-
// Additional Replay configuration goes in here, for example:
26-
blockAllMedia: true,
27-
}),
28-
],
22+
// You can remove this option if you're not planning to use the Sentry Session Replay feature:
23+
integrations: [
24+
new Sentry.Replay({
25+
// Additional Replay configuration goes in here, for example:
26+
blockAllMedia: true
27+
})
28+
]
2929
});

apps/events/sentry.edge.config.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
// Note that this config is unrelated to the Vercel Edge Runtime and is also required when running locally.
44
// https://docs.sentry.io/platforms/javascript/guides/nextjs/
55

6-
import * as Sentry from "@sentry/nextjs";
6+
import * as Sentry from '@sentry/nextjs';
77

88
Sentry.init({
9-
dsn: "https://2443816b47614d33b0de9828382c2e0a@o4506108287320064.ingest.sentry.io/4506108297150464",
9+
dsn: 'https://2443816b47614d33b0de9828382c2e0a@o4506108287320064.ingest.sentry.io/4506108297150464',
1010

11-
// Adjust this value in production, or use tracesSampler for greater control
12-
tracesSampleRate: 1,
11+
// Adjust this value in production, or use tracesSampler for greater control
12+
tracesSampleRate: 1,
1313

14-
// Setting this option to true will print useful information to the console while you're setting up Sentry.
15-
debug: false,
14+
// Setting this option to true will print useful information to the console while you're setting up Sentry.
15+
debug: false
1616
});

apps/events/sentry.server.config.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
// The config you add here will be used whenever the server handles a request.
33
// https://docs.sentry.io/platforms/javascript/guides/nextjs/
44

5-
import * as Sentry from "@sentry/nextjs";
5+
import * as Sentry from '@sentry/nextjs';
66

77
Sentry.init({
8-
dsn: "https://2443816b47614d33b0de9828382c2e0a@o4506108287320064.ingest.sentry.io/4506108297150464",
8+
dsn: 'https://2443816b47614d33b0de9828382c2e0a@o4506108287320064.ingest.sentry.io/4506108297150464',
99

10-
// Adjust this value in production, or use tracesSampler for greater control
11-
tracesSampleRate: 1,
12-
profilesSampleRate: 1.0,
13-
// Setting this option to true will print useful information to the console while you're setting up Sentry.
14-
debug: false,
10+
// Adjust this value in production, or use tracesSampler for greater control
11+
tracesSampleRate: 1,
12+
profilesSampleRate: 1.0,
13+
// Setting this option to true will print useful information to the console while you're setting up Sentry.
14+
debug: false
1515
});

apps/events/src/components/Admin/CodeForm.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ const CodeForm: React.FC<Props> = ({ tiers, closeModal }) => {
5555
const watch = watchFunc(['percentage', 'tierId']);
5656

5757
const onSubmit = (fields: FormInput) => {
58-
const eventId = tiers?.find((tier) => tier.id === fields.tierId)?.eventId
59-
if (!eventId) throw new Error('No event id found')
58+
const eventId = tiers?.find((tier) => tier.id === fields.tierId)?.eventId;
59+
if (!eventId) throw new Error('No event id found');
6060
mutation.mutate(
6161
{
6262
type: fields.percentage ? 'percent' : 'flat',

apps/events/src/components/Admin/Event/Details.tsx

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import React, { useEffect } from 'react';
1212
import { Controller, useForm } from 'react-hook-form';
1313
import { z } from 'zod';
1414
type Event = RouterOutput['event']['getEventAdmin'];
15-
import {toast} from 'sonner'
15+
import { toast } from 'sonner';
1616

1717
const zodFileType = z
1818
.any()
@@ -34,11 +34,10 @@ const Details = ({ event }: { event: Event }) => {
3434
name: z.string(),
3535
startTime: z.string(),
3636
endTime: z.string(),
37-
location: z
38-
.object({
39-
address: z.string(),
40-
coordinates: z.tuple([z.number(), z.number()])
41-
}),
37+
location: z.object({
38+
address: z.string(),
39+
coordinates: z.tuple([z.number(), z.number()])
40+
}),
4241
bannerImage: zodFileType.optional(),
4342
ticketImage: zodFileType.optional(),
4443
feeBearer: z.boolean(),
@@ -67,11 +66,11 @@ const Details = ({ event }: { event: Event }) => {
6766
}
6867
}
6968
: {
70-
location: {
71-
address: '',
72-
coordinates: [0, 0]
73-
}
74-
}),
69+
location: {
70+
address: '',
71+
coordinates: [0, 0]
72+
}
73+
}),
7574
...(event.description && {
7675
description: event.description
7776
})
@@ -85,14 +84,13 @@ const Details = ({ event }: { event: Event }) => {
8584
}, []);
8685

8786
const onSubmit = async (fields: FormInput) => {
88-
89-
const startTime = parseISO(fields.startTime)
90-
const endTime = parseISO(fields.endTime)
91-
if (endTime < startTime) {
92-
toast.error('End time should be greater than start time')
93-
return
94-
}
95-
console.log(fields);
87+
const startTime = parseISO(fields.startTime);
88+
const endTime = parseISO(fields.endTime);
89+
if (endTime < startTime) {
90+
toast.error('End time should be greater than start time');
91+
return;
92+
}
93+
console.log(fields);
9694
const isBannerURL = isValidHttpUrl(event.image ?? '');
9795
const isTicketURL = isValidHttpUrl(event.ticketImage ?? '');
9896
if ((fields.bannerImage[0] || isBannerURL) && (fields.ticketImage[0] || isTicketURL)) {

0 commit comments

Comments
 (0)