From 5378afa827bd99aeb11cce2cb4d724ac8f116489 Mon Sep 17 00:00:00 2001 From: Lyton Date: Sat, 9 Nov 2024 17:30:39 -0600 Subject: [PATCH] lint: configure pretttier for frontend --- api/src/server.ts | 2 +- app/package-lock.json | 24 ++++++++++++++++++++++++ app/package.json | 7 ++++++- app/src/App.tsx | 14 +++++++------- 4 files changed, 38 insertions(+), 9 deletions(-) diff --git a/api/src/server.ts b/api/src/server.ts index a9c5d8d..b5b7054 100644 --- a/api/src/server.ts +++ b/api/src/server.ts @@ -21,5 +21,5 @@ app.use("/workshop", routes.workshop); connectDB(); app.listen(process.env.PORT || 8000, () => - console.log(`Server running on port ${process.env.PORT || 8000}`) + console.log(`Server running on port ${process.env.PORT || 8000}`), ); diff --git a/app/package-lock.json b/app/package-lock.json index 0eb6ef8..57f4d2c 100644 --- a/app/package-lock.json +++ b/app/package-lock.json @@ -28,6 +28,9 @@ "typescript": "^4.9.5", "web-vitals": "^2.1.4", "yup": "^1.4.0" + }, + "devDependencies": { + "prettier": "^3.3.3" } }, "node_modules/@adobe/css-tools": { @@ -14485,6 +14488,21 @@ "node": ">= 0.8.0" } }, + "node_modules/prettier": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz", + "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==", + "dev": true, + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, "node_modules/pretty-bytes": { "version": "5.6.0", "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz", @@ -28443,6 +28461,12 @@ "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==" }, + "prettier": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz", + "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==", + "dev": true + }, "pretty-bytes": { "version": "5.6.0", "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz", diff --git a/app/package.json b/app/package.json index 5a89bbd..73ea78c 100644 --- a/app/package.json +++ b/app/package.json @@ -28,7 +28,9 @@ "start": "react-scripts start", "build": "react-scripts build", "test": "react-scripts test", - "eject": "react-scripts eject" + "eject": "react-scripts eject", + "format": "npx prettier --write \"src/**/*.{js,jsx,ts,tsx}\"", + "format-check": "npx prettier --check \"src/**/*.{js,jsx,ts,tsx}\"" }, "eslintConfig": { "extends": [ @@ -47,5 +49,8 @@ "last 1 firefox version", "last 1 safari version" ] + }, + "devDependencies": { + "prettier": "^3.3.3" } } diff --git a/app/src/App.tsx b/app/src/App.tsx index a44b132..4321c72 100644 --- a/app/src/App.tsx +++ b/app/src/App.tsx @@ -9,13 +9,13 @@ import AuthCallback from "./pages/auth-callback"; function App(): ReactElement { return (
- - } /> - } /> - } /> - } /> - } /> - } /> + + } /> + } /> + } /> + } /> + } /> + } />
);