chore: biome
This commit is contained in:
+34
@@ -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
@@ -1,35 +1,37 @@
|
|||||||
{
|
{
|
||||||
"name": "owof-announcements",
|
"name": "owof-announcements",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "nodemon -w src/server -x tsx src/server/main.ts",
|
"dev": "nodemon -w src/server -x tsx src/server/main.ts",
|
||||||
"start": "NODE_ENV=production tsx src/server/main.ts",
|
"start": "NODE_ENV=production tsx src/server/main.ts",
|
||||||
"build": "vite build"
|
"build": "vite build",
|
||||||
},
|
"biome-full": "biome check --write"
|
||||||
"dependencies": {
|
},
|
||||||
"@emotion/react": "^11.14.0",
|
"dependencies": {
|
||||||
"@emotion/styled": "^11.14.1",
|
"@emotion/react": "^11.14.0",
|
||||||
"@fontsource/roboto": "^5.2.10",
|
"@emotion/styled": "^11.14.1",
|
||||||
"@mui/icons-material": "^9.1.1",
|
"@fontsource/roboto": "^5.2.10",
|
||||||
"@mui/material": "^9.1.1",
|
"@mui/icons-material": "^9.1.1",
|
||||||
"better-sqlite3": "^12.11.1",
|
"@mui/material": "^9.1.1",
|
||||||
"express": "^5.1.0",
|
"better-sqlite3": "^12.11.1",
|
||||||
"kysely": "^0.29.2",
|
"express": "^5.1.0",
|
||||||
"react": "^19.1.0",
|
"kysely": "^0.29.2",
|
||||||
"react-dom": "^19.1.0",
|
"react": "^19.1.0",
|
||||||
"tsx": "^4.19.3",
|
"react-dom": "^19.1.0",
|
||||||
"typescript": "^5.8.3",
|
"tsx": "^4.19.3",
|
||||||
"vite-express": "*"
|
"typescript": "^5.8.3",
|
||||||
},
|
"vite-express": "*"
|
||||||
"devDependencies": {
|
},
|
||||||
"@types/express": "^5.0.1",
|
"devDependencies": {
|
||||||
"@types/node": "^22.15.2",
|
"@biomejs/biome": "2.5.0",
|
||||||
"@types/react": "^19.1.2",
|
"@types/express": "^5.0.1",
|
||||||
"@types/react-dom": "^19.1.2",
|
"@types/node": "^22.15.2",
|
||||||
"@vitejs/plugin-react": "^4.4.1",
|
"@types/react": "^19.1.2",
|
||||||
"nodemon": "^3.1.10",
|
"@types/react-dom": "^19.1.2",
|
||||||
"vite": "^6.3.3"
|
"@vitejs/plugin-react": "^4.4.1",
|
||||||
}
|
"nodemon": "^3.1.10",
|
||||||
|
"vite": "^6.3.3"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-2
@@ -1,7 +1,11 @@
|
|||||||
import Button from '@mui/material/Button';
|
import Button from "@mui/material/Button";
|
||||||
|
|
||||||
function App() {
|
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;
|
export default App;
|
||||||
|
|||||||
+7
-7
@@ -1,7 +1,7 @@
|
|||||||
import '@fontsource/roboto/300.css';
|
import "@fontsource/roboto/300.css";
|
||||||
import '@fontsource/roboto/400.css';
|
import "@fontsource/roboto/400.css";
|
||||||
import '@fontsource/roboto/500.css';
|
import "@fontsource/roboto/500.css";
|
||||||
import '@fontsource/roboto/700.css';
|
import "@fontsource/roboto/700.css";
|
||||||
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import ReactDOM from "react-dom/client";
|
import ReactDOM from "react-dom/client";
|
||||||
@@ -9,7 +9,7 @@ import ReactDOM from "react-dom/client";
|
|||||||
import App from "./App";
|
import App from "./App";
|
||||||
|
|
||||||
ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
|
ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
|
||||||
<React.StrictMode>
|
<React.StrictMode>
|
||||||
<App />
|
<App />
|
||||||
</React.StrictMode>,
|
</React.StrictMode>,
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.json",
|
"extends": "../../tsconfig.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"module": "ESNext",
|
"module": "ESNext",
|
||||||
"moduleResolution": "Bundler",
|
"moduleResolution": "Bundler",
|
||||||
"jsx": "react-jsx"
|
"jsx": "react-jsx"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+8
-8
@@ -5,18 +5,18 @@ import { db } from "./db/database.js";
|
|||||||
const app = express();
|
const app = express();
|
||||||
|
|
||||||
app.get("/hello", (_, res) => {
|
app.get("/hello", (_, res) => {
|
||||||
res.send("Hello Vite + React + TypeScript!");
|
res.send("Hello Vite + React + TypeScript!");
|
||||||
});
|
});
|
||||||
|
|
||||||
app.get("/api/announcements", async (_, res) => {
|
app.get("/api/announcements", async (_, res) => {
|
||||||
const announcements = await db
|
const announcements = await db
|
||||||
.selectFrom("announcements")
|
.selectFrom("announcements")
|
||||||
.select(["id", "title", "text", "publication_date", "image"])
|
.select(["id", "title", "text", "publication_date", "image"])
|
||||||
.orderBy("announcements.publication_date", "desc")
|
.orderBy("announcements.publication_date", "desc")
|
||||||
.execute();
|
.execute();
|
||||||
res.json(announcements);
|
res.json(announcements);
|
||||||
});
|
});
|
||||||
|
|
||||||
ViteExpress.listen(app, 3000, () =>
|
ViteExpress.listen(app, 3000, () =>
|
||||||
console.log("Server is listening on port 3000..."),
|
console.log("Server is listening on port 3000..."),
|
||||||
);
|
);
|
||||||
|
|||||||
+17
-17
@@ -1,19 +1,19 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "ESNext",
|
"target": "ESNext",
|
||||||
"useDefineForClassFields": true,
|
"useDefineForClassFields": true,
|
||||||
"lib": ["DOM", "DOM.Iterable", "ESNext"],
|
"lib": ["DOM", "DOM.Iterable", "ESNext"],
|
||||||
"allowJs": false,
|
"allowJs": false,
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"allowSyntheticDefaultImports": true,
|
"allowSyntheticDefaultImports": true,
|
||||||
"strict": true,
|
"strict": true,
|
||||||
"forceConsistentCasingInFileNames": true,
|
"forceConsistentCasingInFileNames": true,
|
||||||
"module": "NodeNext",
|
"module": "NodeNext",
|
||||||
"moduleResolution": "NodeNext",
|
"moduleResolution": "NodeNext",
|
||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true,
|
||||||
"isolatedModules": true,
|
"isolatedModules": true,
|
||||||
"noEmit": true
|
"noEmit": true
|
||||||
},
|
},
|
||||||
"include": ["src"]
|
"include": ["src"]
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
import { defineConfig } from "vite";
|
|
||||||
import react from "@vitejs/plugin-react";
|
import react from "@vitejs/plugin-react";
|
||||||
|
import { defineConfig } from "vite";
|
||||||
|
|
||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [react()],
|
plugins: [react()],
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -165,6 +165,60 @@
|
|||||||
"@babel/helper-string-parser" "^7.29.7"
|
"@babel/helper-string-parser" "^7.29.7"
|
||||||
"@babel/helper-validator-identifier" "^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":
|
"@emotion/babel-plugin@^11.13.5":
|
||||||
version "11.13.5"
|
version "11.13.5"
|
||||||
resolved "https://registry.yarnpkg.com/@emotion/babel-plugin/-/babel-plugin-11.13.5.tgz#eab8d65dbded74e0ecfd28dc218e75607c4e7bc0"
|
resolved "https://registry.yarnpkg.com/@emotion/babel-plugin/-/babel-plugin-11.13.5.tgz#eab8d65dbded74e0ecfd28dc218e75607c4e7bc0"
|
||||||
|
|||||||
Reference in New Issue
Block a user