Skip to content

Commit aef4ce0

Browse files
Merge pull request #56 from authts/up-biome
upgrade biome
2 parents c66260a + 647184b commit aef4ce0

File tree

13 files changed

+76
-82
lines changed

13 files changed

+76
-82
lines changed

api/biome.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
3-
"extends": ["../biome.json"]
2+
"root": false,
3+
"extends": "//"
44
}

api/src/jwtUtils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { NextFunction, Request, Response } from 'express';
2-
import { type JWTVerifyGetKey, createRemoteJWKSet, jwtVerify } from 'jose';
2+
import { createRemoteJWKSet, type JWTVerifyGetKey, jwtVerify } from 'jose';
33
import { requireEnvVar } from './envUtils.js';
44
import type { AugmentedRequest } from './types.js';
55

biome.json

Lines changed: 17 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,38 @@
11
{
2-
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
2+
"$schema": "https://biomejs.dev/schemas/2.0.6/schema.json",
33
"vcs": {
44
"enabled": true,
55
"clientKind": "git",
66
"useIgnoreFile": true
77
},
88
"files": {
9-
"ignore": ["**/node_modules/**", "**/dist/**"]
9+
"includes": ["**", "!**/node_modules/**", "!**/dist/**"]
1010
},
11-
"organizeImports": {
12-
"enabled": true
13-
},
14-
"linter": {
15-
"enabled": true,
16-
"rules": {
17-
"all": true,
18-
"complexity": {
19-
"noVoid": "off"
20-
},
21-
"correctness": {
22-
"noNodejsModules": "off",
23-
"noUndeclaredDependencies": "off"
24-
},
25-
"suspicious": {
26-
"noConsole": "off",
27-
"noConsoleLog": "off"
11+
"assist": {
12+
"actions": {
13+
"source": {
14+
"recommended": true
2815
}
2916
}
3017
},
3118
"formatter": {
32-
"enabled": true,
19+
"formatWithErrors": true,
3320
"lineWidth": 120,
34-
"indentStyle": "space",
35-
"indentWidth": 2
21+
"indentStyle": "space"
22+
},
23+
"linter": {
24+
"domains": {
25+
"project": "all",
26+
"react": "all",
27+
"test": "all"
28+
},
29+
"rules": {}
3630
},
3731
"javascript": {
3832
"formatter": {
3933
"quoteStyle": "single",
4034
"trailingCommas": "all"
41-
},
42-
"globals": ["React"]
35+
}
4336
},
4437
"css": {
4538
"formatter": {

package-lock.json

Lines changed: 36 additions & 37 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"docker-compose-all": "cp .env.sample .env && docker compose build && docker compose up"
77
},
88
"devDependencies": {
9-
"@biomejs/biome": "^1.9.4",
9+
"@biomejs/biome": "2.0.6",
1010
"markdown-toc": "^1.2.0"
1111
}
1212
}

react/biome.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
3-
"extends": ["../biome.json"]
2+
"root": false,
3+
"extends": "//"
44
}

react/src/components/Alert.tsx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,16 @@ export const Alert: FC<AlertProps> = (props) => {
2121
color = 'rgb(95, 33, 32)';
2222
}
2323

24-
return <div style={{ backgroundColor, color, padding: '1rem', whiteSpace: 'pre-wrap' }}>{children}</div>;
24+
return (
25+
<div
26+
style={{
27+
backgroundColor,
28+
color,
29+
padding: '1rem',
30+
whiteSpace: 'pre-wrap',
31+
}}
32+
>
33+
{children}
34+
</div>
35+
);
2536
};

react/src/components/ProtectedApp.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,7 @@ export const ProtectedApp: FC<ProtectedAppProps> = (props) => {
4646
const anyErrorMessage = getAuthHealthError?.message || auth.error?.message;
4747

4848
if (anyLoading) {
49-
return (
50-
<>
51-
<h1>Loading...</h1>
52-
</>
53-
);
49+
return <h1>Loading...</h1>;
5450
}
5551
if (anyErrorMessage) {
5652
return (

react/src/components/routes/Playground/Playground.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { FC } from 'react';
2-
import { WithToken } from './WithToken.tsx';
32
import { WithoutToken } from './WithoutToken.tsx';
3+
import { WithToken } from './WithToken.tsx';
44

55
export const Playground: FC = () => {
66
return (

react/src/components/routes/Playground/WithToken.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export const WithToken: FC = () => {
3535
return error ? (
3636
<Alert variant="error">{error.message}</Alert>
3737
) : isPending ? (
38-
<>Loading...</>
38+
<div>Loading...</div>
3939
) : (
4040
<Alert variant="success">{JSON.stringify(data, null, 2)}</Alert>
4141
);

0 commit comments

Comments
 (0)