chore: biome

This commit is contained in:
redglow
2026-06-20 14:45:28 +02:00
parent 2d3c08c96c
commit 4708a6396c
9 changed files with 169 additions and 75 deletions
+34
View File
@@ -0,0 +1,34 @@
{
"$schema": "https://biomejs.dev/schemas/2.5.0/schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true
},
"files": {
"ignoreUnknown": false
},
"formatter": {
"enabled": true,
"indentStyle": "tab"
},
"linter": {
"enabled": true,
"rules": {
"preset": "recommended"
}
},
"javascript": {
"formatter": {
"quoteStyle": "double"
}
},
"assist": {
"enabled": true,
"actions": {
"source": {
"organizeImports": "on"
}
}
}
}
+35 -33
View File
@@ -1,35 +1,37 @@
{
"name": "owof-announcements",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "nodemon -w src/server -x tsx src/server/main.ts",
"start": "NODE_ENV=production tsx src/server/main.ts",
"build": "vite build"
},
"dependencies": {
"@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.1",
"@fontsource/roboto": "^5.2.10",
"@mui/icons-material": "^9.1.1",
"@mui/material": "^9.1.1",
"better-sqlite3": "^12.11.1",
"express": "^5.1.0",
"kysely": "^0.29.2",
"react": "^19.1.0",
"react-dom": "^19.1.0",
"tsx": "^4.19.3",
"typescript": "^5.8.3",
"vite-express": "*"
},
"devDependencies": {
"@types/express": "^5.0.1",
"@types/node": "^22.15.2",
"@types/react": "^19.1.2",
"@types/react-dom": "^19.1.2",
"@vitejs/plugin-react": "^4.4.1",
"nodemon": "^3.1.10",
"vite": "^6.3.3"
}
"name": "owof-announcements",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "nodemon -w src/server -x tsx src/server/main.ts",
"start": "NODE_ENV=production tsx src/server/main.ts",
"build": "vite build",
"biome-full": "biome check --write"
},
"dependencies": {
"@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.1",
"@fontsource/roboto": "^5.2.10",
"@mui/icons-material": "^9.1.1",
"@mui/material": "^9.1.1",
"better-sqlite3": "^12.11.1",
"express": "^5.1.0",
"kysely": "^0.29.2",
"react": "^19.1.0",
"react-dom": "^19.1.0",
"tsx": "^4.19.3",
"typescript": "^5.8.3",
"vite-express": "*"
},
"devDependencies": {
"@biomejs/biome": "2.5.0",
"@types/express": "^5.0.1",
"@types/node": "^22.15.2",
"@types/react": "^19.1.2",
"@types/react-dom": "^19.1.2",
"@vitejs/plugin-react": "^4.4.1",
"nodemon": "^3.1.10",
"vite": "^6.3.3"
}
}
+6 -2
View File
@@ -1,7 +1,11 @@
import Button from '@mui/material/Button';
import Button from "@mui/material/Button";
function App() {
return <div>the app: <Button variant='contained'>Click here</Button></div>
return (
<div>
the app: <Button variant="contained">Click here</Button>
</div>
);
}
export default App;
+7 -7
View File
@@ -1,7 +1,7 @@
import '@fontsource/roboto/300.css';
import '@fontsource/roboto/400.css';
import '@fontsource/roboto/500.css';
import '@fontsource/roboto/700.css';
import "@fontsource/roboto/300.css";
import "@fontsource/roboto/400.css";
import "@fontsource/roboto/500.css";
import "@fontsource/roboto/700.css";
import React from "react";
import ReactDOM from "react-dom/client";
@@ -9,7 +9,7 @@ import ReactDOM from "react-dom/client";
import App from "./App";
ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
<React.StrictMode>
<App />
</React.StrictMode>,
<React.StrictMode>
<App />
</React.StrictMode>,
);
+6 -6
View File
@@ -1,8 +1,8 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"module": "ESNext",
"moduleResolution": "Bundler",
"jsx": "react-jsx"
}
"extends": "../../tsconfig.json",
"compilerOptions": {
"module": "ESNext",
"moduleResolution": "Bundler",
"jsx": "react-jsx"
}
}
+8 -8
View File
@@ -5,18 +5,18 @@ import { db } from "./db/database.js";
const app = express();
app.get("/hello", (_, res) => {
res.send("Hello Vite + React + TypeScript!");
res.send("Hello Vite + React + TypeScript!");
});
app.get("/api/announcements", async (_, res) => {
const announcements = await db
.selectFrom("announcements")
.select(["id", "title", "text", "publication_date", "image"])
.orderBy("announcements.publication_date", "desc")
.execute();
res.json(announcements);
const announcements = await db
.selectFrom("announcements")
.select(["id", "title", "text", "publication_date", "image"])
.orderBy("announcements.publication_date", "desc")
.execute();
res.json(announcements);
});
ViteExpress.listen(app, 3000, () =>
console.log("Server is listening on port 3000..."),
console.log("Server is listening on port 3000..."),
);
+17 -17
View File
@@ -1,19 +1,19 @@
{
"compilerOptions": {
"target": "ESNext",
"useDefineForClassFields": true,
"lib": ["DOM", "DOM.Iterable", "ESNext"],
"allowJs": false,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"module": "NodeNext",
"moduleResolution": "NodeNext",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true
},
"include": ["src"]
"compilerOptions": {
"target": "ESNext",
"useDefineForClassFields": true,
"lib": ["DOM", "DOM.Iterable", "ESNext"],
"allowJs": false,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"module": "NodeNext",
"moduleResolution": "NodeNext",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true
},
"include": ["src"]
}
+2 -2
View File
@@ -1,7 +1,7 @@
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
plugins: [react()],
});
+54
View File
@@ -165,6 +165,60 @@
"@babel/helper-string-parser" "^7.29.7"
"@babel/helper-validator-identifier" "^7.29.7"
"@biomejs/biome@2.5.0":
version "2.5.0"
resolved "https://registry.yarnpkg.com/@biomejs/biome/-/biome-2.5.0.tgz#e2bf9805de38b8a9ece8518514c2460eb43d229f"
integrity sha512-4kURkd9hAPrdDM3C9n82ycYgx8hvQcW6MjKTEejruj8rK0N8P3OPpdy8BvI8kt3KWY4ycF5XtDOrktetEfhfuw==
optionalDependencies:
"@biomejs/cli-darwin-arm64" "2.5.0"
"@biomejs/cli-darwin-x64" "2.5.0"
"@biomejs/cli-linux-arm64" "2.5.0"
"@biomejs/cli-linux-arm64-musl" "2.5.0"
"@biomejs/cli-linux-x64" "2.5.0"
"@biomejs/cli-linux-x64-musl" "2.5.0"
"@biomejs/cli-win32-arm64" "2.5.0"
"@biomejs/cli-win32-x64" "2.5.0"
"@biomejs/cli-darwin-arm64@2.5.0":
version "2.5.0"
resolved "https://registry.yarnpkg.com/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-2.5.0.tgz#dd7d1fbd91079b4f608549000bf293327b68f241"
integrity sha512-Mn3Fwi3SA5fgmfCPqmzpWF2DLZnms3BVAhM088nTnGrTZmHS3wwIjcoZPqpXeNgd3DrrLH6xp8vTLIBuJoZiXw==
"@biomejs/cli-darwin-x64@2.5.0":
version "2.5.0"
resolved "https://registry.yarnpkg.com/@biomejs/cli-darwin-x64/-/cli-darwin-x64-2.5.0.tgz#de83f5f084fd80495d9ba88508468109aafa6013"
integrity sha512-rg3VPL5P8mYro6pqlXYXuJWph21slVp3SZtAqWSrkZs40d2gTzYmHF8E/X1iTID25btmNKltNDJ926sqVBp7DQ==
"@biomejs/cli-linux-arm64-musl@2.5.0":
version "2.5.0"
resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.5.0.tgz#587934b08c13f54e643269264d9b756451ea1b37"
integrity sha512-vQdM4oSGaf7ZNeGO9w5+Y8SBtyser9M6znxYbm7Ec8wInxJu1WiKxFYZW5Auj2d80bcVvefuGGRxoFOE0eee8g==
"@biomejs/cli-linux-arm64@2.5.0":
version "2.5.0"
resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-arm64/-/cli-linux-arm64-2.5.0.tgz#c60e4ed82c82768f63b4d0d8d1b600d45f0cb4c3"
integrity sha512-tl+LW8fdD96/xdeWtWwc82LIOc5CoY7N2AsogLTp5R4ECErYt+8Jl/N68ezN9vzSiqPTxw6vjcihoLPYKZHrlw==
"@biomejs/cli-linux-x64-musl@2.5.0":
version "2.5.0"
resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-2.5.0.tgz#02ab3dc8a026af31abee96fae803d385ed633910"
integrity sha512-+9hIcMngJ+yGUahXqZuZ8CoWKJE9SAZsFsM3QDvXpNsLbXZ9lqVzgBhOk/jTSYkOA0GLP9eu3teukqpLUojHMg==
"@biomejs/cli-linux-x64@2.5.0":
version "2.5.0"
resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-x64/-/cli-linux-x64-2.5.0.tgz#e24c9638779ed82a3425c9a5b1dfde54e001eaaa"
integrity sha512-zpEGf4RQbFEh8Vt7OmavLyyOzRbtcE9osCqrS1kfvt8jDvxwhKXLSf7n0ebr/ov0RJ9ssP+lhs6C8a9WwFvrQA==
"@biomejs/cli-win32-arm64@2.5.0":
version "2.5.0"
resolved "https://registry.yarnpkg.com/@biomejs/cli-win32-arm64/-/cli-win32-arm64-2.5.0.tgz#2fe5fff09650bab3611c3df4b115e93dbf4c732e"
integrity sha512-jB0wAvTLI4itx5VidqVUejPQFhRUxiZ9l9FvZ26D5fl6t3qme+ZB4PD3bTSeL1vZ8NI2Rx/zj6H9zcESuGHKGw==
"@biomejs/cli-win32-x64@2.5.0":
version "2.5.0"
resolved "https://registry.yarnpkg.com/@biomejs/cli-win32-x64/-/cli-win32-x64-2.5.0.tgz#9ab0e69e7d343bc42c758b959cfdc7fdd20a17d2"
integrity sha512-VT/lF+GId+67j8aDfLkxdxNoVApsPSTbyAtB3jJq0IWTrY77WXfbPfpngxq0bA6JCEv/7k8C9qWjDRKRznDlyw==
"@emotion/babel-plugin@^11.13.5":
version "11.13.5"
resolved "https://registry.yarnpkg.com/@emotion/babel-plugin/-/babel-plugin-11.13.5.tgz#eab8d65dbded74e0ecfd28dc218e75607c4e7bc0"