Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions api/biome.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
"extends": ["../biome.json"]
"root": false,
"extends": "//"
}
2 changes: 1 addition & 1 deletion api/src/jwtUtils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { NextFunction, Request, Response } from 'express';
import { type JWTVerifyGetKey, createRemoteJWKSet, jwtVerify } from 'jose';
import { createRemoteJWKSet, type JWTVerifyGetKey, jwtVerify } from 'jose';
import { requireEnvVar } from './envUtils.js';
import type { AugmentedRequest } from './types.js';

Expand Down
41 changes: 17 additions & 24 deletions biome.json
Original file line number Diff line number Diff line change
@@ -1,45 +1,38 @@
{
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
"$schema": "https://biomejs.dev/schemas/2.0.6/schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true
},
"files": {
"ignore": ["**/node_modules/**", "**/dist/**"]
"includes": ["**", "!**/node_modules/**", "!**/dist/**"]
},
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
"all": true,
"complexity": {
"noVoid": "off"
},
"correctness": {
"noNodejsModules": "off",
"noUndeclaredDependencies": "off"
},
"suspicious": {
"noConsole": "off",
"noConsoleLog": "off"
"assist": {
"actions": {
"source": {
"recommended": true
}
}
},
"formatter": {
"enabled": true,
"formatWithErrors": true,
"lineWidth": 120,
"indentStyle": "space",
"indentWidth": 2
"indentStyle": "space"
},
"linter": {
"domains": {
"project": "all",
"react": "all",
"test": "all"
},
"rules": {}
},
"javascript": {
"formatter": {
"quoteStyle": "single",
"trailingCommas": "all"
},
"globals": ["React"]
}
},
"css": {
"formatter": {
Expand Down
73 changes: 36 additions & 37 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"docker-compose-all": "cp .env.sample .env && docker compose build && docker compose up"
},
"devDependencies": {
"@biomejs/biome": "^1.9.4",
"@biomejs/biome": "2.0.6",
"markdown-toc": "^1.2.0"
}
}
4 changes: 2 additions & 2 deletions react/biome.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
"extends": ["../biome.json"]
"root": false,
"extends": "//"
}
13 changes: 12 additions & 1 deletion react/src/components/Alert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,16 @@ export const Alert: FC<AlertProps> = (props) => {
color = 'rgb(95, 33, 32)';
}

return <div style={{ backgroundColor, color, padding: '1rem', whiteSpace: 'pre-wrap' }}>{children}</div>;
return (
<div
style={{
backgroundColor,
color,
padding: '1rem',
whiteSpace: 'pre-wrap',
}}
>
{children}
</div>
);
};
6 changes: 1 addition & 5 deletions react/src/components/ProtectedApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,7 @@ export const ProtectedApp: FC<ProtectedAppProps> = (props) => {
const anyErrorMessage = getAuthHealthError?.message || auth.error?.message;

if (anyLoading) {
return (
<>
<h1>Loading...</h1>
</>
);
return <h1>Loading...</h1>;
}
if (anyErrorMessage) {
return (
Expand Down
2 changes: 1 addition & 1 deletion react/src/components/routes/Playground/Playground.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { FC } from 'react';
import { WithToken } from './WithToken.tsx';
import { WithoutToken } from './WithoutToken.tsx';
import { WithToken } from './WithToken.tsx';

export const Playground: FC = () => {
return (
Expand Down
2 changes: 1 addition & 1 deletion react/src/components/routes/Playground/WithToken.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const WithToken: FC = () => {
return error ? (
<Alert variant="error">{error.message}</Alert>
) : isPending ? (
<>Loading...</>
<div>Loading...</div>
) : (
<Alert variant="success">{JSON.stringify(data, null, 2)}</Alert>
);
Expand Down
2 changes: 1 addition & 1 deletion react/src/components/routes/Playground/WithoutToken.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const WithoutToken: FC = () => {
return error ? (
<Alert variant="error">{error.message}</Alert>
) : isPending ? (
<>Loading...</>
<div>Loading...</div>
) : (
<Alert variant="success">{JSON.stringify(data, null, 2)}</Alert>
);
Expand Down
3 changes: 0 additions & 3 deletions react/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@ import { UserManager, WebStorageStateStore } from 'oidc-client-ts';

export const userManager = new UserManager({
authority: import.meta.env.VITE_AUTHORITY,
// biome-ignore lint/style/useNamingConvention: Expected
client_id: import.meta.env.VITE_CLIENT_ID,
// biome-ignore lint/style/useNamingConvention: Expected
redirect_uri: `${window.location.origin}${window.location.pathname}`,
// biome-ignore lint/style/useNamingConvention: Expected
post_logout_redirect_uri: window.location.origin,
userStore: new WebStorageStateStore({ store: window.sessionStorage }),
monitorSession: true, // this allows cross tab login/logout detection
Expand Down
4 changes: 1 addition & 3 deletions react/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import react from '@vitejs/plugin-react';
import { type UserConfigExport, defineConfig, loadEnv } from 'vite';
import { defineConfig, loadEnv, type UserConfigExport } from 'vite';

// https://vitejs.dev/config/
// biome-ignore lint/style/noDefaultExport: Expected
export default defineConfig(({ command, mode }) => {
const env = loadEnv(mode, process.cwd());

Expand All @@ -23,7 +22,6 @@ export default defineConfig(({ command, mode }) => {
target: env.VITE_API_BASE_URL,
changeOrigin: true,
rewrite: (path) => {
// biome-ignore lint/performance/useTopLevelRegex: We accept the perf hit
return path.replace(/^\/api/, '');
},
},
Expand Down