diff --git a/.prettierignore b/.prettierignore index 5020ef5baa..58981153af 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1 +1,18 @@ -cypress/e2e/ \ No newline at end of file +cypress/e2e/ +node_modules/ +.next/ +.turbo/ +.vercel/ +dist/ +out/ +build/ +email/ + +ops.schema.json +ops.ts +schema.graphql +nexus-typegen.ts +client.json +server.json + +*.sql diff --git a/.prettierrc.js b/.prettierrc.mjs similarity index 71% rename from .prettierrc.js rename to .prettierrc.mjs index 94293e5d55..bc469ffb14 100644 --- a/.prettierrc.js +++ b/.prettierrc.mjs @@ -1,6 +1,8 @@ -module.exports = { +export default { semi: false, singleQuote: true, trailingComma: 'es5', + // tabWidth: 2, + // printWidth: 120, plugins: ['prettier-plugin-organize-imports', 'prettier-plugin-tailwindcss'], } diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 95beb04e92..330395457e 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -25,6 +25,7 @@ "prisma.prisma", "stivo.tailwind-fold", "wix.vscode-import-cost", - "yzhang.markdown-all-in-one" + "yzhang.markdown-all-in-one", + "folke.vscode-monorepo-workspace" ] } diff --git a/.vscode/settings.json b/.vscode/settings.json index 4f9a54d82f..f2a1097d38 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -19,8 +19,28 @@ "files.associations": { "plyconfig.json": "jsonc" }, - "prettier.configPath": ".prettierrc.js", - "editor.defaultFormatter": "esbenp.prettier-vscode", - "notebook.defaultFormatter": "esbenp.prettier-vscode", - "prettier.prettierPath": "./node_modules/prettier" + "prettier.requireConfig": true, + "prettier.useEditorConfig": false, + "prettier.configPath": "${workspaceFolder}/.prettierrc.js", + "prettier.resolveGlobalModules": true, + "[javascript]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[javascriptreact]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[typescript]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[typescriptreact]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "eslint.workingDirectories": [ + { + "pattern": "apps/*/" + }, + { + "pattern": "packages/*/" + } + ] } diff --git a/apps/auth/.prettierignore b/apps/auth/.prettierignore deleted file mode 100644 index 77978000db..0000000000 --- a/apps/auth/.prettierignore +++ /dev/null @@ -1,4 +0,0 @@ -node_modules/ -.next/ -.turbo/ -.vercel/ diff --git a/apps/auth/.prettierrc.js b/apps/auth/.prettierrc.js deleted file mode 100644 index e14472a44a..0000000000 --- a/apps/auth/.prettierrc.js +++ /dev/null @@ -1,9 +0,0 @@ -module.exports = { - semi: false, - singleQuote: true, - trailingComma: 'es5', - plugins: [ - require('prettier-plugin-tailwindcss'), - require('prettier-plugin-organize-imports'), - ], -} diff --git a/apps/auth/package.json b/apps/auth/package.json index 26adb99b8a..93fa36e5a1 100644 --- a/apps/auth/package.json +++ b/apps/auth/package.json @@ -37,9 +37,6 @@ "eslint-config-next": "14.1.0", "postcss": "8.4.41", "postcss-import": "16.1.0", - "prettier": "2.8.8", - "prettier-plugin-organize-imports": "3.2.3", - "prettier-plugin-tailwindcss": "0.4.1", "prisma": "5.18.0", "tailwindcss": "3.4.9", "typescript": "5.4.5" diff --git a/apps/auth/src/pages/index.tsx b/apps/auth/src/pages/index.tsx index b2fe35ec34..01a9a82c56 100644 --- a/apps/auth/src/pages/index.tsx +++ b/apps/auth/src/pages/index.tsx @@ -77,7 +77,7 @@ function SignInOutButton() { return (
-

+

{t('auth.loginInfo')}

-
-
+
+
+
-
+

{t('auth.authentication')}

-
+
diff --git a/apps/backend-docker/.prettierignore b/apps/backend-docker/.prettierignore deleted file mode 100644 index 3f3f8ab656..0000000000 --- a/apps/backend-docker/.prettierignore +++ /dev/null @@ -1,5 +0,0 @@ -node_modules/ -.turbo/ -dist/ -src/client/ -.nyc_output/ diff --git a/apps/backend-docker/.prettierrc.cjs b/apps/backend-docker/.prettierrc.cjs deleted file mode 100644 index c3611b9ee2..0000000000 --- a/apps/backend-docker/.prettierrc.cjs +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = { - semi: false, - singleQuote: true, - trailingComma: 'es5', - plugins: [require('prettier-plugin-organize-imports')], -} diff --git a/apps/frontend-control/.prettierignore b/apps/frontend-control/.prettierignore deleted file mode 100644 index 77978000db..0000000000 --- a/apps/frontend-control/.prettierignore +++ /dev/null @@ -1,4 +0,0 @@ -node_modules/ -.next/ -.turbo/ -.vercel/ diff --git a/apps/frontend-control/.prettierrc.js b/apps/frontend-control/.prettierrc.js deleted file mode 100644 index e14472a44a..0000000000 --- a/apps/frontend-control/.prettierrc.js +++ /dev/null @@ -1,9 +0,0 @@ -module.exports = { - semi: false, - singleQuote: true, - trailingComma: 'es5', - plugins: [ - require('prettier-plugin-tailwindcss'), - require('prettier-plugin-organize-imports'), - ], -} diff --git a/apps/frontend-control/package.json b/apps/frontend-control/package.json index bebe30ae44..fb1c298870 100644 --- a/apps/frontend-control/package.json +++ b/apps/frontend-control/package.json @@ -60,9 +60,6 @@ "eslint-config-next": "14.1.0", "postcss": "8.4.41", "postcss-import": "16.1.0", - "prettier": "2.8.8", - "prettier-plugin-organize-imports": "3.2.3", - "prettier-plugin-tailwindcss": "0.4.1", "tailwindcss": "3.4.9", "tailwindcss-radix": "3.0.3", "ts-node": "10.9.1", diff --git a/apps/frontend-control/src/components/Layout.tsx b/apps/frontend-control/src/components/Layout.tsx index 0e05272ed4..0fb4c161f6 100644 --- a/apps/frontend-control/src/components/Layout.tsx +++ b/apps/frontend-control/src/components/Layout.tsx @@ -30,7 +30,7 @@ function Layout({ title, children, sessionId, className }: LayoutProps) { } return ( -
+
KlickerUZH Controller {title} -
+
-
+
{children}
-
+
diff --git a/apps/frontend-control/src/components/common/ListButton.tsx b/apps/frontend-control/src/components/common/ListButton.tsx index 84338f2518..53486cd219 100644 --- a/apps/frontend-control/src/components/common/ListButton.tsx +++ b/apps/frontend-control/src/components/common/ListButton.tsx @@ -44,7 +44,7 @@ function ListButton({ onClick={onClick ? onClick : () => router.push(link)} className={{ root: twMerge( - 'p-2 border border-solid rounded-md bg-uzh-grey-40 border-uzh-grey-100 w-full', + 'bg-uzh-grey-40 border-uzh-grey-100 w-full rounded-md border border-solid p-2', className?.root ), }} diff --git a/apps/frontend-control/src/components/common/LoginForm.tsx b/apps/frontend-control/src/components/common/LoginForm.tsx index 27773a6b20..be1030b3ac 100644 --- a/apps/frontend-control/src/components/common/LoginForm.tsx +++ b/apps/frontend-control/src/components/common/LoginForm.tsx @@ -57,9 +57,9 @@ export function LoginForm({ } return ( -
-
-
+
+
+
-
+
diff --git a/apps/frontend-control/src/components/layout/Header.tsx b/apps/frontend-control/src/components/layout/Header.tsx index b4d476ed39..d3d56ab6e5 100644 --- a/apps/frontend-control/src/components/layout/Header.tsx +++ b/apps/frontend-control/src/components/layout/Header.tsx @@ -15,8 +15,8 @@ function Header({ title }: HeaderProps) { const [logoutUser] = useMutation(LogoutUserDocument) return ( -
-
{title}
+
+
{title}
-

+

{t('shared.generic.profile')}

@@ -150,7 +150,7 @@ function CreateAccountForm({ name="email" label={t('shared.generic.email')} className={{ - label: 'text-black mt-4', + label: 'mt-4 text-black', }} data={{ cy: 'email-field' }} /> @@ -180,7 +180,7 @@ function CreateAccountForm({ name="password" label={t('shared.generic.password')} className={{ - label: 'text-black mt-0', + label: 'mt-0 text-black', }} type="password" data={{ cy: 'password-field' }} @@ -190,7 +190,7 @@ function CreateAccountForm({ name="passwordRepetition" label={t('shared.generic.passwordRepetition')} className={{ - label: 'text-black mt-0', + label: 'mt-0 text-black', }} type="password" data={{ cy: 'password-repetition-field' }} @@ -200,7 +200,7 @@ function CreateAccountForm({
{t('pwa.profile.publicProfile')}
-
+
-
-

+
+

{t('pwa.createAccount.dataProcessingTitle')}

+
{t('pwa.login.existingParticipantAccount')} diff --git a/apps/frontend-pwa/src/components/forms/LoginForm.tsx b/apps/frontend-pwa/src/components/forms/LoginForm.tsx index a6338aad6f..457b15a807 100644 --- a/apps/frontend-pwa/src/components/forms/LoginForm.tsx +++ b/apps/frontend-pwa/src/components/forms/LoginForm.tsx @@ -182,7 +182,7 @@ export function LoginForm({ {setMagicLinkLogin && ( {data.groupActivityDetails.group.participants?.length === 1 && ( -
+
{t.rich('pwa.groupActivity.minTwoPersons', { br: () =>
, })} @@ -186,7 +186,7 @@ function GroupActivityDetails() { {instance?.results && (
{instance.results.passed ? ( -
+
{t('pwa.groupActivity.groupActivityPassed')}
) : ( -
+
{t('pwa.groupActivity.groupActivityFailed')}
)} -
{`${ +
{`${ instance.results.points }/${maxTotalPoints} ${t('shared.generic.points')}`}
diff --git a/apps/frontend-pwa/src/pages/index.tsx b/apps/frontend-pwa/src/pages/index.tsx index 531576fd8e..78ed19ff1c 100644 --- a/apps/frontend-pwa/src/pages/index.tsx +++ b/apps/frontend-pwa/src/pages/index.tsx @@ -223,7 +223,7 @@ const Index = function () { return (
{/* {hasSeenSurvey === 'false' && ( @@ -249,7 +249,7 @@ const Index = function () { {activeSessions.length !== 0 && (
-

+

{t('shared.generic.activeSessions')}

@@ -270,7 +270,7 @@ const Index = function () {
)}
-

+

{t('shared.generic.practice')}

@@ -299,7 +299,7 @@ const Index = function () {
{activeMicrolearning.length > 0 && (
-

+

{t('shared.generic.microlearning')}

@@ -330,7 +330,7 @@ const Index = function () {
)}
-

+

{t('pwa.general.myCourses')}

diff --git a/apps/frontend-pwa/src/pages/join.tsx b/apps/frontend-pwa/src/pages/join.tsx index 05b50e00a0..9968a290d6 100644 --- a/apps/frontend-pwa/src/pages/join.tsx +++ b/apps/frontend-pwa/src/pages/join.tsx @@ -29,9 +29,9 @@ function JoinPage() { return ( -
+

{t('pwa.general.joinCourse')}

-
{t('pwa.joinCourse.introLoggedInNoCourse')}
+
{t('pwa.joinCourse.introLoggedInNoCourse')}
-
+
{t.rich('pwa.general.activeSessionsBy', { i: (text) => {text}, diff --git a/apps/frontend-pwa/src/pages/login.tsx b/apps/frontend-pwa/src/pages/login.tsx index fb0950664a..48c4f1c025 100644 --- a/apps/frontend-pwa/src/pages/login.tsx +++ b/apps/frontend-pwa/src/pages/login.tsx @@ -111,7 +111,7 @@ function Login() { } return ( -
+
-

+

{t('pwa.general.processingLogin')}

diff --git a/apps/frontend-pwa/src/pages/microlearning/[id]/[ix].tsx b/apps/frontend-pwa/src/pages/microlearning/[id]/[ix].tsx index 88068958e1..6dab082e7e 100644 --- a/apps/frontend-pwa/src/pages/microlearning/[id]/[ix].tsx +++ b/apps/frontend-pwa/src/pages/microlearning/[id]/[ix].tsx @@ -48,7 +48,7 @@ function MicrolearningInstance() {
-
+

{t('shared.generic.congrats')}

@@ -70,7 +70,7 @@ function MicrolearningEvaluation() {
-
+

{t('shared.generic.evaluation')}

diff --git a/apps/frontend-pwa/src/pages/microlearning/[id]/index.tsx b/apps/frontend-pwa/src/pages/microlearning/[id]/index.tsx index 0fe5836856..860c5b963f 100644 --- a/apps/frontend-pwa/src/pages/microlearning/[id]/index.tsx +++ b/apps/frontend-pwa/src/pages/microlearning/[id]/index.tsx @@ -57,7 +57,7 @@ function MicrolearningIntroduction({ id }: { id: string }) { displayName={data.microLearning.displayName} course={data.microLearning.course ?? undefined} > -
+
{!selfData?.self && ( {t.rich('pwa.general.userNotLoggedIn', { @@ -65,7 +65,7 @@ function MicrolearningIntroduction({ id }: { id: string }) {
-
+
-
+

{t('shared.generic.repetition')}

diff --git a/apps/frontend-pwa/src/pages/session/[id].tsx b/apps/frontend-pwa/src/pages/session/[id].tsx index a3bfdc9c98..b2ff5c5108 100644 --- a/apps/frontend-pwa/src/pages/session/[id].tsx +++ b/apps/frontend-pwa/src/pages/session/[id].tsx @@ -177,10 +177,10 @@ function Index({ id }: Props) { > -
+
{!activeBlock ? ( isGamificationEnabled ? ( -
+
) : ( @@ -218,7 +218,7 @@ function Index({ id }: Props) { {selfData?.self && isGamificationEnabled && (