Skip to content

Commit 9f53a78

Browse files
chore: update biome
Signed-off-by: Henry Gressmann <mail@henrygressmann.de>
1 parent 6885f7e commit 9f53a78

37 files changed

+217
-194
lines changed

Cargo.lock

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

biome.json

Lines changed: 35 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
{
2-
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
2+
"$schema": "https://biomejs.dev/schemas/2.0.0/schema.json",
3+
"assist": {
4+
"enabled": true,
5+
"actions": { "recommended": true, "source": { "recommended": true, "organizeImports": "off" } }
6+
},
37
"formatter": {
48
"indentStyle": "tab",
59
"indentWidth": 2,
@@ -19,23 +23,43 @@
1923
},
2024
"linter": {
2125
"rules": {
26+
"nursery": {
27+
"useUniqueElementIds": "off"
28+
},
2229
"suspicious": {
2330
"noArrayIndexKey": "off"
2431
},
2532
"a11y": {
26-
"useSemanticElements": "off"
33+
"useSemanticElements": "off",
34+
"noStaticElementInteractions": "off"
35+
},
36+
"style": {
37+
"noDescendingSpecificity": "off"
2738
}
2839
}
2940
},
3041
"files": {
31-
"ignore": [
32-
"**/node_modules/*",
33-
"**/dist/*",
34-
"**/target/*",
35-
"**/.astro/*",
36-
"**/api/dashboard.ts",
37-
"tracker/script.min.js",
38-
"tracker/script.d.ts"
42+
"includes": [
43+
"**",
44+
"!**/dist/*",
45+
"!**/target/*",
46+
"!**/.astro/*",
47+
"!**/api/dashboard.ts",
48+
"!tracker/script.min.js",
49+
"!tracker/script.d.ts"
3950
]
40-
}
51+
},
52+
"overrides": [
53+
{
54+
"includes": ["**/*.astro"],
55+
"linter": {
56+
"rules": {
57+
"correctness": {
58+
"noUnusedImports": "off",
59+
"noUnusedVariables": "off"
60+
}
61+
}
62+
}
63+
}
64+
]
4165
}

data/licenses-cargo.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

data/licenses-npm.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

src/app/core/reports.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ pub struct DimensionFilter {
116116
value: Option<String>,
117117
}
118118

119-
fn filter_sql(filters: &[DimensionFilter]) -> Result<(String, ParamVec)> {
119+
fn filter_sql(filters: &[DimensionFilter]) -> Result<(String, ParamVec<'_>)> {
120120
let mut params = ParamVec::new();
121121

122122
if filters.is_empty() {

web/astro.config.ts

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,56 @@
11
import path from "node:path";
22
import react from "@astrojs/react";
3+
import type { AstroIntegration } from "astro";
34
import { defineConfig } from "astro/config";
45
import license from "rollup-plugin-license";
5-
import type { AstroIntegration } from "astro";
6+
67
const dirname = path.dirname(new URL(import.meta.url).pathname);
78

89
const proxy = {
9-
"/api": {
10-
target: "http://localhost:9042",
11-
changeOrigin: true,
12-
cookieDomainRewrite: "localhost:4321",
13-
},
10+
"/api": {
11+
target: "http://localhost:9042",
12+
changeOrigin: true,
13+
cookieDomainRewrite: "localhost:4321",
14+
},
1415
};
1516

1617
function setPrerender(): AstroIntegration {
17-
let isDev = false;
18-
return {
19-
name: "set-prerender",
20-
hooks: {
21-
"astro:config:setup": ({ command }) => {
22-
isDev = command === "dev";
23-
},
24-
"astro:route:setup": ({ route }) => {
25-
if (isDev && route.component.endsWith("/pages/p/[...project].astro")) {
26-
route.prerender = false;
27-
}
28-
},
29-
},
30-
};
18+
let isDev = false;
19+
return {
20+
name: "set-prerender",
21+
hooks: {
22+
"astro:config:setup": ({ command }) => {
23+
isDev = command === "dev";
24+
},
25+
"astro:route:setup": ({ route }) => {
26+
if (isDev && route.component.endsWith("/pages/p/[...project].astro")) {
27+
route.prerender = false;
28+
}
29+
},
30+
},
31+
};
3132
}
3233

3334
// https://astro.build/config
3435
export default defineConfig({
35-
vite: {
36-
server: { proxy },
37-
preview: { proxy },
38-
plugins: [
39-
license({
40-
thirdParty: {
41-
allow:
42-
"(MIT OR Apache-2.0 OR ISC OR BSD-3-Clause OR 0BSD OR CC0-1.0 OR Unlicense)",
43-
output: {
44-
file: path.join(dirname, "../", "data", "licenses-npm.json"),
45-
template: (dependencies) => JSON.stringify(dependencies),
46-
},
47-
},
48-
// biome-ignore lint/suspicious/noExplicitAny: wrong type
49-
}) as any,
50-
],
51-
},
52-
integrations: [react(), setPrerender()],
53-
redirects: {
54-
"/settings": "/settings/projects",
55-
},
36+
vite: {
37+
server: { proxy },
38+
preview: { proxy },
39+
plugins: [
40+
license({
41+
thirdParty: {
42+
allow: "(MIT OR Apache-2.0 OR ISC OR BSD-3-Clause OR 0BSD OR CC0-1.0 OR Unlicense)",
43+
output: {
44+
file: path.join(dirname, "../", "data", "licenses-npm.json"),
45+
template: (dependencies) => JSON.stringify(dependencies),
46+
},
47+
},
48+
// biome-ignore lint/suspicious/noExplicitAny: wrong type
49+
}) as any,
50+
],
51+
},
52+
integrations: [react(), setPrerender()],
53+
redirects: {
54+
"/settings": "/settings/projects",
55+
},
5656
});

0 commit comments

Comments
 (0)