Skip to content

Commit

Permalink
fix: prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
orig committed Sep 9, 2023
1 parent 4b10748 commit a40f87a
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 46 deletions.
7 changes: 1 addition & 6 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -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"]
}
4 changes: 1 addition & 3 deletions apps/backend/src/users/users.controller.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,7 @@ describe('UsersController', () => {
sort: { name: SortOrder.ASCENDING, role: SortOrder.DESCENDING },
};

await request(app.getHttpServer())
.get('/users?limit=10&page=2&[email protected]&sort[name]=asc&sort[role]=desc')
.expect(200);
await request(app.getHttpServer()).get('/users?limit=10&page=2&[email protected]&sort[name]=asc&sort[role]=desc').expect(200);

expect(usersService.findAll).toHaveBeenCalledWith(findAllOptions);
});
Expand Down
7 changes: 1 addition & 6 deletions apps/backend/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
}
17 changes: 4 additions & 13 deletions apps/frontend/src/components/theme-switcher/theme-switcher.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand All @@ -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;
}
};

Expand Down
4 changes: 1 addition & 3 deletions apps/frontend/src/routes/register/verify/[token]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ export default component$(() => {
<div class="max-w-md">
<p class="py-6">
{!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")}
</p>
<Link href="/" class="btn btn-primary">
Go back
Expand Down
8 changes: 3 additions & 5 deletions apps/frontend/src/routes/register/verify/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,10 @@ export default component$(() => {
{!store.loading && !store.isVerified && (
<>
<p class="mt-4">
To keep your account secure, we need to verify your email address. Check your inbox for a message from us to
complete the process.
</p>
<p class="mt-2 mb-5">
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.
</p>
<p class="mt-2 mb-5">If you don't see the email, please check your spam folder or contact our support team for help.</p>
<div class="form-control w-full max-w-xs inline-flex">
<br />
{store.resent && <p class="mt-2 mb-8">Verification email has been sent!</p>}
Expand Down
7 changes: 1 addition & 6 deletions libs/prisma/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
}
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,3 @@
"tslib": "^2.3.0"
}
}

14 changes: 11 additions & 3 deletions tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
}

0 comments on commit a40f87a

Please sign in to comment.