diff --git a/.gitea/workflows/client.yaml b/.gitea/workflows/client.yaml index a7ec504..01ee051 100644 --- a/.gitea/workflows/client.yaml +++ b/.gitea/workflows/client.yaml @@ -1,6 +1,8 @@ name: build app on: + push: + branches: ["main"] pull_request: branches: ["main"] @@ -20,6 +22,14 @@ jobs: with: node-version: ${{ matrix.node-version }} - - name: Build + - name: Lint + working-directory: client run: | npm install + npm run prettier:check + + - name: Build + working-directory: client + run: | + npm install + npm run build \ No newline at end of file diff --git a/.gitea/workflows/server.yaml b/.gitea/workflows/server.yaml index 4aea603..9c6fd3f 100644 --- a/.gitea/workflows/server.yaml +++ b/.gitea/workflows/server.yaml @@ -1,6 +1,8 @@ name: Portfolio Backend CI on: + push: + branches: ["main"] pull_request: branches: ["main"] @@ -16,10 +18,12 @@ jobs: python-version: "3.11" - name: Install dependencies + working-directory: server run: | python -m pip install --upgrade pip pip install pytest pip install -r requirements.txt - name: Lint with black + working-directory: server run: | black --check . diff --git a/README.md b/README.md index e69de29..3baca03 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,3 @@ +# [Lucas Jensen](https://lucasjensen.me/) + +WIP README: Documentation is in the works, but the website is live! diff --git a/client/.eslintrc.cjs b/client/.eslintrc.cjs index d6c9537..6e8698b 100644 --- a/client/.eslintrc.cjs +++ b/client/.eslintrc.cjs @@ -2,17 +2,17 @@ module.exports = { root: true, env: { browser: true, es2020: true }, extends: [ - 'eslint:recommended', - 'plugin:@typescript-eslint/recommended', - 'plugin:react-hooks/recommended', + "eslint:recommended", + "plugin:@typescript-eslint/recommended", + "plugin:react-hooks/recommended", ], - ignorePatterns: ['dist', '.eslintrc.cjs'], - parser: '@typescript-eslint/parser', - plugins: ['react-refresh'], + ignorePatterns: ["dist", ".eslintrc.cjs"], + parser: "@typescript-eslint/parser", + plugins: ["react-refresh"], rules: { - 'react-refresh/only-export-components': [ - 'warn', + "react-refresh/only-export-components": [ + "warn", { allowConstantExport: true }, ], }, -} +}; diff --git a/client/index.html b/client/index.html index cdc2917..1da7e17 100644 --- a/client/index.html +++ b/client/index.html @@ -1,4 +1,4 @@ - +
diff --git a/client/package.json b/client/package.json index 2200709..29973b1 100644 --- a/client/package.json +++ b/client/package.json @@ -7,7 +7,9 @@ "dev": "vite --port 3000", "build": "tsc && vite build", "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", - "preview": "vite preview" + "preview": "vite preview", + "prettier:check": "npx prettier --check .", + "prettier:fix": "npx prettier --write ." }, "dependencies": { "@auth0/auth0-react": "^2.2.4", @@ -40,4 +42,4 @@ "vite": "^5.0.8", "vitest": "^1.2.0" } -} \ No newline at end of file +} diff --git a/client/src/api.tsx b/client/src/api.tsx index 12f968a..b5b83e5 100644 --- a/client/src/api.tsx +++ b/client/src/api.tsx @@ -6,7 +6,7 @@ export const API_URL = API_URL_ENV.endsWith("/") export async function fetchFromApi( endpoint: string, method: string = "GET", - body?: unknown + body?: unknown, ) { try { const options: RequestInit = { diff --git a/client/src/main.tsx b/client/src/main.tsx index c901d4f..b23e9d1 100644 --- a/client/src/main.tsx +++ b/client/src/main.tsx @@ -18,5 +18,5 @@ ReactDOM.createRoot(document.getElementById("root")!).render( >