diff --git a/biome.json b/biome.json
new file mode 100644
index 0000000..68c8333
--- /dev/null
+++ b/biome.json
@@ -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"
+ }
+ }
+ }
+}
diff --git a/package.json b/package.json
index 5340726..2788916 100644
--- a/package.json
+++ b/package.json
@@ -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"
+ }
}
diff --git a/src/client/App.tsx b/src/client/App.tsx
index 173f36e..082a243 100644
--- a/src/client/App.tsx
+++ b/src/client/App.tsx
@@ -1,7 +1,11 @@
-import Button from '@mui/material/Button';
+import Button from "@mui/material/Button";
function App() {
- return
the app:
+ return (
+
+ the app:
+
+ );
}
export default App;
diff --git a/src/client/main.tsx b/src/client/main.tsx
index 1e28c6c..9a290a0 100644
--- a/src/client/main.tsx
+++ b/src/client/main.tsx
@@ -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(
-
-
- ,
+
+
+ ,
);
diff --git a/src/client/tsconfig.json b/src/client/tsconfig.json
index fa6f55c..b7cd478 100644
--- a/src/client/tsconfig.json
+++ b/src/client/tsconfig.json
@@ -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"
+ }
}
diff --git a/src/server/main.ts b/src/server/main.ts
index fa85884..1a6804a 100644
--- a/src/server/main.ts
+++ b/src/server/main.ts
@@ -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..."),
);
diff --git a/tsconfig.json b/tsconfig.json
index 74c1f05..e97c27e 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -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"]
}
diff --git a/vite.config.ts b/vite.config.ts
index 9cc50ea..e29a791 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -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()],
});
diff --git a/yarn.lock b/yarn.lock
index 7806f8e..ae9880b 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -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"