From a40f87aa16d2f8cbac7ed8360507944618f11b8e Mon Sep 17 00:00:00 2001 From: orig Date: Sat, 9 Sep 2023 23:16:18 +0300 Subject: [PATCH] fix: prettier --- .vscode/extensions.json | 7 +------ apps/backend/src/users/users.controller.spec.ts | 4 +--- apps/backend/tsconfig.spec.json | 7 +------ .../theme-switcher/theme-switcher.tsx | 17 ++++------------- .../routes/register/verify/[token]/index.tsx | 4 +--- .../src/routes/register/verify/index.tsx | 8 +++----- libs/prisma/tsconfig.spec.json | 7 +------ package.json | 1 - tsconfig.base.json | 14 +++++++++++--- 9 files changed, 23 insertions(+), 46 deletions(-) diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 6a302fe5..b06ee44d 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,8 +1,3 @@ { - "recommendations": [ - "nrwl.angular-console", - "esbenp.prettier-vscode", - "dbaeumer.vscode-eslint", - "firsttris.vscode-jest-runner" - ] + "recommendations": ["nrwl.angular-console", "esbenp.prettier-vscode", "dbaeumer.vscode-eslint", "firsttris.vscode-jest-runner"] } diff --git a/apps/backend/src/users/users.controller.spec.ts b/apps/backend/src/users/users.controller.spec.ts index 168e3cb5..c5092a2d 100644 --- a/apps/backend/src/users/users.controller.spec.ts +++ b/apps/backend/src/users/users.controller.spec.ts @@ -105,9 +105,7 @@ describe('UsersController', () => { sort: { name: SortOrder.ASCENDING, role: SortOrder.DESCENDING }, }; - await request(app.getHttpServer()) - .get('/users?limit=10&page=2&filter=test@test.com&sort[name]=asc&sort[role]=desc') - .expect(200); + await request(app.getHttpServer()).get('/users?limit=10&page=2&filter=test@test.com&sort[name]=asc&sort[role]=desc').expect(200); expect(usersService.findAll).toHaveBeenCalledWith(findAllOptions); }); diff --git a/apps/backend/tsconfig.spec.json b/apps/backend/tsconfig.spec.json index 9b2a121d..f6d8ffcc 100644 --- a/apps/backend/tsconfig.spec.json +++ b/apps/backend/tsconfig.spec.json @@ -5,10 +5,5 @@ "module": "commonjs", "types": ["jest", "node"] }, - "include": [ - "jest.config.ts", - "src/**/*.test.ts", - "src/**/*.spec.ts", - "src/**/*.d.ts" - ] + "include": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts", "src/**/*.d.ts"] } diff --git a/apps/frontend/src/components/theme-switcher/theme-switcher.tsx b/apps/frontend/src/components/theme-switcher/theme-switcher.tsx index 8df4bccc..74add4d4 100644 --- a/apps/frontend/src/components/theme-switcher/theme-switcher.tsx +++ b/apps/frontend/src/components/theme-switcher/theme-switcher.tsx @@ -7,20 +7,13 @@ export const DARK_THEME = 'dracula'; export const LIGHT_THEME = 'light'; export type ThemePreference = typeof DARK_THEME | typeof LIGHT_THEME; -export const colorSchemeChangeListener = ( - onColorSchemeChange: (isDark: boolean) => void -) => { +export const colorSchemeChangeListener = (onColorSchemeChange: (isDark: boolean) => void) => { const listener = ({ matches: isDark }: MediaQueryListEvent) => { onColorSchemeChange(isDark); }; - window - .matchMedia('(prefers-color-scheme: dark)') - .addEventListener('change', (event) => listener(event)); + window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', (event) => listener(event)); - return () => - window - .matchMedia('(prefers-color-scheme: dark)') - .removeEventListener('change', listener); + return () => window.matchMedia('(prefers-color-scheme: dark)').removeEventListener('change', listener); }; export const setPreference = (theme: ThemePreference) => { @@ -37,9 +30,7 @@ export const getColorPreference = (): ThemePreference => { if (localStorage.getItem(themeStorageKey)) { return localStorage.getItem(themeStorageKey) as ThemePreference; } else { - return window.matchMedia('(prefers-color-scheme: dark)').matches - ? DARK_THEME - : LIGHT_THEME; + return window.matchMedia('(prefers-color-scheme: dark)').matches ? DARK_THEME : LIGHT_THEME; } }; diff --git a/apps/frontend/src/routes/register/verify/[token]/index.tsx b/apps/frontend/src/routes/register/verify/[token]/index.tsx index dda33f33..de1f0a16 100644 --- a/apps/frontend/src/routes/register/verify/[token]/index.tsx +++ b/apps/frontend/src/routes/register/verify/[token]/index.tsx @@ -34,9 +34,7 @@ export default component$(() => {

{!store.loading && - (store.verified - ? 'Your account has been verified successfully' - : "We couldn't verify your account. Try again later")} + (store.verified ? 'Your account has been verified successfully' : "We couldn't verify your account. Try again later")}

Go back diff --git a/apps/frontend/src/routes/register/verify/index.tsx b/apps/frontend/src/routes/register/verify/index.tsx index f080e174..572b1420 100644 --- a/apps/frontend/src/routes/register/verify/index.tsx +++ b/apps/frontend/src/routes/register/verify/index.tsx @@ -42,12 +42,10 @@ export default component$(() => { {!store.loading && !store.isVerified && ( <>

- To keep your account secure, we need to verify your email address. Check your inbox for a message from us to - complete the process. -

-

- If you don't see the email, please check your spam folder or contact our support team for help. + To keep your account secure, we need to verify your email address. Check your inbox for a message from us to complete + the process.

+

If you don't see the email, please check your spam folder or contact our support team for help.


{store.resent &&

Verification email has been sent!

} diff --git a/libs/prisma/tsconfig.spec.json b/libs/prisma/tsconfig.spec.json index 9b2a121d..f6d8ffcc 100644 --- a/libs/prisma/tsconfig.spec.json +++ b/libs/prisma/tsconfig.spec.json @@ -5,10 +5,5 @@ "module": "commonjs", "types": ["jest", "node"] }, - "include": [ - "jest.config.ts", - "src/**/*.test.ts", - "src/**/*.spec.ts", - "src/**/*.d.ts" - ] + "include": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts", "src/**/*.d.ts"] } diff --git a/package.json b/package.json index ab5797b1..81f32a3d 100644 --- a/package.json +++ b/package.json @@ -88,4 +88,3 @@ "tslib": "^2.3.0" } } - diff --git a/tsconfig.base.json b/tsconfig.base.json index c18bcb6c..91a3916a 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -10,13 +10,21 @@ "importHelpers": true, "target": "es2015", "module": "esnext", - "lib": ["es2020", "dom"], + "lib": [ + "es2020", + "dom" + ], "skipLibCheck": true, "skipDefaultLibCheck": true, "baseUrl": ".", "paths": { - "@reduced.to/prisma": ["libs/prisma/src/index.ts"] + "@reduced.to/prisma": [ + "libs/prisma/src/index.ts" + ] } }, - "exclude": ["node_modules", "tmp"] + "exclude": [ + "node_modules", + "tmp" + ] }