From 43d52dacec3cb15c454d613d363a7de78f57663b Mon Sep 17 00:00:00 2001 From: Martin Alexander Kaminski Date: Sun, 13 Sep 2026 15:52:14 +0200 Subject: [PATCH 1/3] chore: add Prettier --- .prettierrc | 1 + package-lock.json | 21 +++++++++++++++++++++ package.json | 1 + 3 files changed, 23 insertions(+) create mode 100644 .prettierrc diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/.prettierrc @@ -0,0 +1 @@ +{} diff --git a/package-lock.json b/package-lock.json index 8fa5678..152fe1b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25,9 +25,14 @@ "eslint-plugin-react-hooks": "^7.1.1", "eslint-plugin-react-refresh": "^0.5.4", "globals": "^17.11.0", + "prettier": "3.9.6", "typescript": "~6.0.2", "typescript-eslint": "^8.67.0", "vite": "^8.2.2" + }, + "engines": { + "node": ">=24.6.0", + "npm": ">=11.0.0" } }, "node_modules/@babel/code-frame": { @@ -2367,6 +2372,22 @@ "node": ">= 0.8.0" } }, + "node_modules/prettier": { + "version": "3.9.6", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.9.6.tgz", + "integrity": "sha512-OpN0zzVdiaiAhxpuuj5efpIS4sY9j7bY6uR5mnj5yPzGkdkjNKSJeUThPb60Jw29QuAZgA4o+/iB49kFiaBX6g==", + "dev": true, + "license": "MIT", + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, "node_modules/punycode": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", diff --git a/package.json b/package.json index 69993e5..110cabd 100644 --- a/package.json +++ b/package.json @@ -31,6 +31,7 @@ "eslint-plugin-react-hooks": "^7.1.1", "eslint-plugin-react-refresh": "^0.5.4", "globals": "^17.11.0", + "prettier": "3.9.6", "typescript": "~6.0.2", "typescript-eslint": "^8.67.0", "vite": "^8.2.2" From fd91f66ddc7de227952ac0f2bae84deaf33db2d7 Mon Sep 17 00:00:00 2001 From: Martin Alexander Kaminski Date: Sun, 13 Sep 2026 15:52:47 +0200 Subject: [PATCH 2/3] refactor: format code using Prettier --- README.md | 2 +- eslint.config.js | 18 +++++++++--------- src/App.css | 2 +- src/App.tsx | 16 ++++++++-------- src/index.css | 4 ++-- src/main.tsx | 12 ++++++------ vite.config.ts | 13 +++++-------- 7 files changed, 32 insertions(+), 35 deletions(-) diff --git a/README.md b/README.md index bfbb202..b8df072 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ Before a pull request can be merged: request, and approvals from staff do not count — you review each other's code. 2. **Every review comment must be marked resolved.** Reply to each one, fix it - or explain why not, then click *Resolve conversation*. + or explain why not, then click _Resolve conversation_. 3. **Pushing new commits dismisses the approval**, so if you change something after being approved, ask for another review. This is deliberate: what was approved is what gets merged. diff --git a/eslint.config.js b/eslint.config.js index ef614d2..da6f026 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,14 +1,14 @@ -import js from '@eslint/js' -import globals from 'globals' -import reactHooks from 'eslint-plugin-react-hooks' -import reactRefresh from 'eslint-plugin-react-refresh' -import tseslint from 'typescript-eslint' -import { defineConfig, globalIgnores } from 'eslint/config' +import js from "@eslint/js"; +import globals from "globals"; +import reactHooks from "eslint-plugin-react-hooks"; +import reactRefresh from "eslint-plugin-react-refresh"; +import tseslint from "typescript-eslint"; +import { defineConfig, globalIgnores } from "eslint/config"; export default defineConfig([ - globalIgnores(['dist']), + globalIgnores(["dist"]), { - files: ['**/*.{ts,tsx}'], + files: ["**/*.{ts,tsx}"], extends: [ js.configs.recommended, tseslint.configs.recommended, @@ -19,4 +19,4 @@ export default defineConfig([ globals: globals.browser, }, }, -]) +]); diff --git a/src/App.css b/src/App.css index f90339d..f460279 100644 --- a/src/App.css +++ b/src/App.css @@ -167,7 +167,7 @@ &::before, &::after { - content: ''; + content: ""; position: absolute; top: -4.5px; border: 5px solid transparent; diff --git a/src/App.tsx b/src/App.tsx index 9ca8e8d..0285c94 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,11 +1,11 @@ -import { useState } from 'react' -import heroImg from './assets/hero.png' -import reactLogo from './assets/react.svg' -import viteLogo from './assets/vite.svg' -import './App.css' +import { useState } from "react"; +import heroImg from "./assets/hero.png"; +import reactLogo from "./assets/react.svg"; +import viteLogo from "./assets/vite.svg"; +import "./App.css"; function App() { - const [count, setCount] = useState(0) + const [count, setCount] = useState(0); return ( <> @@ -116,7 +116,7 @@ function App() {
- ) + ); } -export default App +export default App; diff --git a/src/index.css b/src/index.css index 5fb3313..aad5cb1 100644 --- a/src/index.css +++ b/src/index.css @@ -11,8 +11,8 @@ --shadow: rgba(0, 0, 0, 0.1) 0 10px 15px -3px, rgba(0, 0, 0, 0.05) 0 4px 6px -2px; - --sans: system-ui, 'Segoe UI', Roboto, sans-serif; - --heading: system-ui, 'Segoe UI', Roboto, sans-serif; + --sans: system-ui, "Segoe UI", Roboto, sans-serif; + --heading: system-ui, "Segoe UI", Roboto, sans-serif; --mono: ui-monospace, Consolas, monospace; font: 18px/145% var(--sans); diff --git a/src/main.tsx b/src/main.tsx index bef5202..eff7ccc 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -1,10 +1,10 @@ -import { StrictMode } from 'react' -import { createRoot } from 'react-dom/client' -import './index.css' -import App from './App.tsx' +import { StrictMode } from "react"; +import { createRoot } from "react-dom/client"; +import "./index.css"; +import App from "./App.tsx"; -createRoot(document.getElementById('root')!).render( +createRoot(document.getElementById("root")!).render( , -) +); diff --git a/vite.config.ts b/vite.config.ts index d789a7c..f2ac363 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,11 +1,8 @@ -import react, { reactCompilerPreset } from '@vitejs/plugin-react' -import babel from '@rolldown/plugin-babel' -import { defineConfig } from 'vite' +import react, { reactCompilerPreset } from "@vitejs/plugin-react"; +import babel from "@rolldown/plugin-babel"; +import { defineConfig } from "vite"; // https://vite.dev/config/ export default defineConfig({ - plugins: [ - react(), - babel({ presets: [reactCompilerPreset()] }) - ], -}) + plugins: [react(), babel({ presets: [reactCompilerPreset()] })], +}); From 8855d6ef00f822009f8b387e38ef4376cd482bca Mon Sep 17 00:00:00 2001 From: Martin Alexander Kaminski Date: Sun, 13 Sep 2026 19:01:02 +0200 Subject: [PATCH 3/3] refactor: export App as a named export --- src/App.tsx | 2 +- src/main.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index fc2a11b..2e500c4 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -14,4 +14,4 @@ function App() { ); } -export default App; +export { App }; diff --git a/src/main.tsx b/src/main.tsx index eff7ccc..08c3d74 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -1,7 +1,7 @@ import { StrictMode } from "react"; import { createRoot } from "react-dom/client"; import "./index.css"; -import App from "./App.tsx"; +import { App } from "./App.tsx"; createRoot(document.getElementById("root")!).render(