Skip to content

Commit

Permalink
Lint Repo
Browse files Browse the repository at this point in the history
  • Loading branch information
blz committed Jan 24, 2025
1 parent 6b6aefd commit c20b930
Show file tree
Hide file tree
Showing 27 changed files with 2,961 additions and 1,677 deletions.
71 changes: 35 additions & 36 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: NodeJS Build

on:
push:
branches: [ "main" ]
branches: ["main"]

jobs:
build:
Expand All @@ -15,42 +15,41 @@ jobs:
node-version: [20.x]

steps:
- uses: actions/checkout@v4
- uses: azure/login@v2
with:
- uses: actions/checkout@v4
- uses: azure/login@v2
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
cache: 'pnpm'
- name: Copy to .env
run: |
state=$(cat state.yaml)
printf "PUBLIC_STATE=\"\n$state\"" > .env
- run: pnpm install
- run: pnpm exec playwright install-deps
- run: pnpm exec playwright install
- run: pnpm run build
- run: pnpm test
- name: Upload to blob storage
uses: azure/CLI@v2
with:
inlineScript: |
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
cache: "pnpm"
- name: Copy to .env
run: |
state=$(cat state.yaml)
printf "PUBLIC_STATE=\"\n$state\"" > .env
- run: pnpm install
- run: pnpm exec playwright install-deps
- run: pnpm exec playwright install
- run: pnpm run build
- run: pnpm test
- name: Upload to blob storage
uses: azure/CLI@v2
with:
inlineScript: |
az storage blob upload-batch --account-name blzai --auth-mode login -d '$web' -s ./build --overwrite --output none
- name: Purge CDN endpoint
uses: azure/CLI@v2
with:
inlineScript: |
az afd endpoint purge --resource-group blz.ai --profile-name blzai-static --endpoint-name blzai --domains blz.ai www.blz.ai --content-paths '/*'
# Azure logout
- name: logout
run: |
az logout
if: always()

- name: Purge CDN endpoint
uses: azure/CLI@v2
with:
inlineScript: |
az afd endpoint purge --resource-group blz.ai --profile-name blzai-static --endpoint-name blzai --domains blz.ai www.blz.ai --content-paths '/*'
# Azure logout
- name: logout
run: |
az logout
if: always()
42 changes: 21 additions & 21 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: PR
on:
push:
branches: [ "main" ]
branches: ["main"]
pull_request:
branches: [ "main" ]
branches: ["main"]

jobs:
build:
Expand All @@ -12,22 +12,22 @@ jobs:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: Copy to .env
run: |
state=$(cat state.yaml)
printf "PUBLIC_STATE=\"\n$state\"" > .env
- run: pnpm install
- run: pnpm exec playwright install-deps
- run: pnpm exec playwright install
- run: pnpm run build
- run: pnpm test
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"
- name: Copy to .env
run: |
state=$(cat state.yaml)
printf "PUBLIC_STATE=\"\n$state\"" > .env
- run: pnpm install
- run: pnpm exec playwright install-deps
- run: pnpm exec playwright install
- run: pnpm run build
- run: pnpm test
3 changes: 3 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"plugins": ["prettier-plugin-tailwindcss", "prettier-plugin-svelte"]
}
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Blz AI

## Features
* TCG Sealed Product Price Tracker
* Photography Portfolio

- TCG Sealed Product Price Tracker
- Photography Portfolio
91 changes: 46 additions & 45 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,47 +1,48 @@
{
"name": "blz-ai",
"version": "0.0.3",
"private": true,
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"test": "playwright test",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"test:unit": "vitest",
"lint": "prettier --plugin-search-dir . --check . && eslint .",
"format": "prettier --plugin-search-dir . --write ."
},
"devDependencies": {
"@observablehq/plot": "^0.6.16",
"@playwright/test": "^1.49.1",
"@sveltejs/adapter-auto": "^4.0.0",
"@sveltejs/adapter-static": "^3.0.8",
"@sveltejs/kit": "^2.15.1",
"@sveltejs/vite-plugin-svelte": "^4.0.4",
"@tailwindcss/postcss": "^4.0.0",
"@tailwindcss/typography": "^0.5.15",
"@types/d3": "^7.4.3",
"@typescript-eslint/eslint-plugin": "^8.20.0",
"@typescript-eslint/parser": "^8.20.0",
"d3": "^7.9.0",
"daisyui": "^5.0.0-beta.2",
"eslint": "^9.17.0",
"eslint-config-prettier": "^10.0.1",
"eslint-plugin-svelte": "^2.46.1",
"postcss": "^8.4.49",
"prettier": "^3.4.2",
"prettier-plugin-svelte": "^3.3.2",
"svelte": "^5.19.2",
"svelte-check": "^4.1.1",
"tailwindcss": "^4.0.0",
"tslib": "^2.8.1",
"typescript": "^5.7.3",
"vite": "^5.4.12",
"vitest": "^3.0.3",
"yaml": "^2.7.0"
},
"type": "module",
"packageManager": "[email protected]+sha512.88c9c3864450350e65a33587ab801acf946d7c814ed1134da4a924f6df5a2120fd36b46aab68f7cd1d413149112d53c7db3a4136624cfd00ff1846a0c6cef48a"
"name": "blz-ai",
"version": "0.0.3",
"private": true,
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"test": "playwright test",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"test:unit": "vitest",
"lint": "prettier --check . && eslint .",
"format": "prettier --write ."
},
"devDependencies": {
"@observablehq/plot": "^0.6.16",
"@playwright/test": "^1.49.1",
"@sveltejs/adapter-auto": "^4.0.0",
"@sveltejs/adapter-static": "^3.0.8",
"@sveltejs/kit": "^2.15.1",
"@sveltejs/vite-plugin-svelte": "^4.0.4",
"@tailwindcss/postcss": "^4.0.0",
"@tailwindcss/typography": "^0.5.15",
"@types/d3": "^7.4.3",
"@typescript-eslint/eslint-plugin": "^8.20.0",
"@typescript-eslint/parser": "^8.20.0",
"d3": "^7.9.0",
"daisyui": "^5.0.0-beta.2",
"eslint": "^9.17.0",
"eslint-config-prettier": "^10.0.1",
"eslint-plugin-svelte": "^2.46.1",
"postcss": "^8.4.49",
"prettier": "^3.4.2",
"prettier-plugin-svelte": "^3.3.2",
"prettier-plugin-tailwindcss": "^0.6.11",
"svelte": "^5.19.2",
"svelte-check": "^4.1.1",
"tailwindcss": "^4.0.0",
"tslib": "^2.8.1",
"typescript": "^5.7.3",
"vite": "^5.4.12",
"vitest": "^3.0.3",
"yaml": "^2.7.0"
},
"type": "module",
"packageManager": "[email protected]+sha512.88c9c3864450350e65a33587ab801acf946d7c814ed1134da4a924f6df5a2120fd36b46aab68f7cd1d413149112d53c7db3a4136624cfd00ff1846a0c6cef48a"
}
12 changes: 6 additions & 6 deletions playwright.config.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import type { PlaywrightTestConfig } from '@playwright/test';
import type { PlaywrightTestConfig } from "@playwright/test";

const config: PlaywrightTestConfig = {
webServer: {
command: 'npm run build && npm run preview',
port: 4173
},
testDir: 'tests'
webServer: {
command: "npm run build && npm run preview",
port: 4173,
},
testDir: "tests",
};

export default config;
Loading

0 comments on commit c20b930

Please sign in to comment.