Merge pull request 'minor update to readme' (#1) from readme into main

Reviewed-on: #1
This commit is contained in:
Lucas Jensen
2024-06-27 02:46:58 +00:00
10 changed files with 39 additions and 28 deletions

View File

@@ -1,6 +1,8 @@
name: build app name: build app
on: on:
push:
branches: ["main"]
pull_request: pull_request:
branches: ["main"] branches: ["main"]
@@ -20,6 +22,14 @@ jobs:
with: with:
node-version: ${{ matrix.node-version }} node-version: ${{ matrix.node-version }}
- name: Build - name: Lint
working-directory: client
run: | run: |
npm install npm install
npm run prettier:check
- name: Build
working-directory: client
run: |
npm install
npm run build

View File

@@ -1,6 +1,8 @@
name: Portfolio Backend CI name: Portfolio Backend CI
on: on:
push:
branches: ["main"]
pull_request: pull_request:
branches: ["main"] branches: ["main"]
@@ -16,10 +18,12 @@ jobs:
python-version: "3.11" python-version: "3.11"
- name: Install dependencies - name: Install dependencies
working-directory: server
run: | run: |
python -m pip install --upgrade pip python -m pip install --upgrade pip
pip install pytest pip install pytest
pip install -r requirements.txt pip install -r requirements.txt
- name: Lint with black - name: Lint with black
working-directory: server
run: | run: |
black --check . black --check .

View File

@@ -0,0 +1,3 @@
# [Lucas Jensen](https://lucasjensen.me/)
WIP README: Documentation is in the works, but the website is live!

View File

@@ -2,17 +2,17 @@ module.exports = {
root: true, root: true,
env: { browser: true, es2020: true }, env: { browser: true, es2020: true },
extends: [ extends: [
'eslint:recommended', "eslint:recommended",
'plugin:@typescript-eslint/recommended', "plugin:@typescript-eslint/recommended",
'plugin:react-hooks/recommended', "plugin:react-hooks/recommended",
], ],
ignorePatterns: ['dist', '.eslintrc.cjs'], ignorePatterns: ["dist", ".eslintrc.cjs"],
parser: '@typescript-eslint/parser', parser: "@typescript-eslint/parser",
plugins: ['react-refresh'], plugins: ["react-refresh"],
rules: { rules: {
'react-refresh/only-export-components': [ "react-refresh/only-export-components": [
'warn', "warn",
{ allowConstantExport: true }, { allowConstantExport: true },
], ],
}, },
} };

View File

@@ -1,4 +1,4 @@
<!DOCTYPE html> <!doctype html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />

View File

@@ -7,7 +7,9 @@
"dev": "vite --port 3000", "dev": "vite --port 3000",
"build": "tsc && vite build", "build": "tsc && vite build",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", "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": { "dependencies": {
"@auth0/auth0-react": "^2.2.4", "@auth0/auth0-react": "^2.2.4",

View File

@@ -6,7 +6,7 @@ export const API_URL = API_URL_ENV.endsWith("/")
export async function fetchFromApi( export async function fetchFromApi(
endpoint: string, endpoint: string,
method: string = "GET", method: string = "GET",
body?: unknown body?: unknown,
) { ) {
try { try {
const options: RequestInit = { const options: RequestInit = {

View File

@@ -18,5 +18,5 @@ ReactDOM.createRoot(document.getElementById("root")!).render(
> >
<App /> <App />
</Auth0Provider> </Auth0Provider>
</React.StrictMode> </React.StrictMode>,
); );

View File

@@ -2,11 +2,7 @@
"compilerOptions": { "compilerOptions": {
"target": "ES2020", "target": "ES2020",
"useDefineForClassFields": true, "useDefineForClassFields": true,
"lib": [ "lib": ["ES2020", "DOM", "DOM.Iterable"],
"ES2020",
"DOM",
"DOM.Iterable"
],
"module": "ESNext", "module": "ESNext",
"skipLibCheck": true, "skipLibCheck": true,
/* Bundler mode */ /* Bundler mode */
@@ -22,9 +18,7 @@
"noUnusedParameters": true, "noUnusedParameters": true,
"noFallthroughCasesInSwitch": true "noFallthroughCasesInSwitch": true
}, },
"include": [ "include": ["src"],
"src"
],
"references": [ "references": [
{ {
"path": "./tsconfig.node.json" "path": "./tsconfig.node.json"

View File

@@ -6,7 +6,5 @@
"moduleResolution": "bundler", "moduleResolution": "bundler",
"allowSyntheticDefaultImports": true "allowSyntheticDefaultImports": true
}, },
"include": [ "include": ["vite.config.ts"]
"vite.config.ts"
]
} }