From 0366fb8ef83afb50ed236582110ed3817d92b019 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Sat, 21 Oct 2023 14:54:52 -0600 Subject: [PATCH 1/4] fix: contants => constants --- src/lib/{contants.ts => constants.ts} | 0 src/routes/+page.server.ts | 2 +- src/routes/+page.svelte | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) rename src/lib/{contants.ts => constants.ts} (100%) diff --git a/src/lib/contants.ts b/src/lib/constants.ts similarity index 100% rename from src/lib/contants.ts rename to src/lib/constants.ts diff --git a/src/routes/+page.server.ts b/src/routes/+page.server.ts index f86b79956..f02869827 100644 --- a/src/routes/+page.server.ts +++ b/src/routes/+page.server.ts @@ -1,4 +1,4 @@ -import { ENDPOINT } from '$lib/contants'; +import { ENDPOINT } from '$lib/constants'; import type { PageServerLoad } from './$types'; export const load: PageServerLoad = async ({ url }) => { diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index eff66908f..063fd4278 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -9,7 +9,7 @@ import 'highlight.js/styles/dark.min.css'; import type { PageData } from './$types'; - import { ENDPOINT as SERVER_ENDPOINT } from '$lib/contants'; + import { ENDPOINT as SERVER_ENDPOINT } from '$lib/constants'; import { onMount, tick } from 'svelte'; import { page } from '$app/stores'; const suggestions = $page.url.searchParams.get('suggestions'); From 2eea76437898151380e2ba016663c4405169ce65 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Sat, 21 Oct 2023 14:54:52 -0600 Subject: [PATCH 2/4] fix: contants => constants --- src/lib/{contants.ts => constants.ts} | 0 src/routes/+page.server.ts | 2 +- src/routes/+page.svelte | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) rename src/lib/{contants.ts => constants.ts} (100%) diff --git a/src/lib/contants.ts b/src/lib/constants.ts similarity index 100% rename from src/lib/contants.ts rename to src/lib/constants.ts diff --git a/src/routes/+page.server.ts b/src/routes/+page.server.ts index f86b79956..f02869827 100644 --- a/src/routes/+page.server.ts +++ b/src/routes/+page.server.ts @@ -1,4 +1,4 @@ -import { ENDPOINT } from '$lib/contants'; +import { ENDPOINT } from '$lib/constants'; import type { PageServerLoad } from './$types'; export const load: PageServerLoad = async ({ url }) => { diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index eff66908f..063fd4278 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -9,7 +9,7 @@ import 'highlight.js/styles/dark.min.css'; import type { PageData } from './$types'; - import { ENDPOINT as SERVER_ENDPOINT } from '$lib/contants'; + import { ENDPOINT as SERVER_ENDPOINT } from '$lib/constants'; import { onMount, tick } from 'svelte'; import { page } from '$app/stores'; const suggestions = $page.url.searchParams.get('suggestions'); From d1885122632869cf81a61639b3cbf3a0e9953631 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Sat, 21 Oct 2023 22:32:57 -0600 Subject: [PATCH 3/4] chore: npm run fmt --- postcss.config.js | 10 ++-- src/lib/components/common/Overlay.svelte | 66 ++++++++++++------------ src/lib/components/common/Spinner.svelte | 48 ++++++++--------- 3 files changed, 62 insertions(+), 62 deletions(-) diff --git a/postcss.config.js b/postcss.config.js index 2e7af2b7f..0f7721681 100644 --- a/postcss.config.js +++ b/postcss.config.js @@ -1,6 +1,6 @@ export default { - plugins: { - tailwindcss: {}, - autoprefixer: {}, - }, -} + plugins: { + tailwindcss: {}, + autoprefixer: {} + } +}; diff --git a/src/lib/components/common/Overlay.svelte b/src/lib/components/common/Overlay.svelte index a67817fba..d38358212 100644 --- a/src/lib/components/common/Overlay.svelte +++ b/src/lib/components/common/Overlay.svelte @@ -1,33 +1,33 @@ - - -
- {#if show} -
-
- -
-
- -
- - {#if content !== ''} -
- {content} -
- {/if} -
-
- {/if} - - -
+ + +
+ {#if show} +
+
+ +
+
+ +
+ + {#if content !== ''} +
+ {content} +
+ {/if} +
+
+ {/if} + + +
diff --git a/src/lib/components/common/Spinner.svelte b/src/lib/components/common/Spinner.svelte index c2f3708a7..206c7f5ce 100644 --- a/src/lib/components/common/Spinner.svelte +++ b/src/lib/components/common/Spinner.svelte @@ -1,24 +1,24 @@ - - -
- - - - -
+ + +
+ + + + +
From ee638329f13a86cad94124fc354a0c33f02f190c Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Sat, 21 Oct 2023 22:18:43 -0600 Subject: [PATCH 4/4] chore: check PRs for fmt, lint, & build --- .github/workflows/node.js.yaml | 25 +++++++++++++++++++++++++ package.json | 8 ++++++-- 2 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/node.js.yaml diff --git a/.github/workflows/node.js.yaml b/.github/workflows/node.js.yaml new file mode 100644 index 000000000..694cd7720 --- /dev/null +++ b/.github/workflows/node.js.yaml @@ -0,0 +1,25 @@ +name: Node.js CI +on: + push: + branches: ['main'] + pull_request: +jobs: + build: + name: 'Fmt, Lint, & Build' + runs-on: ubuntu-latest + strategy: + matrix: + node-version: + - latest + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + - run: node --version + - run: npm clean-install + - run: npm run fmt + #- run: npm run lint + #- run: npm run lint:types + - run: npm run build diff --git a/package.json b/package.json index 7aeefbef0..ea472a6f1 100644 --- a/package.json +++ b/package.json @@ -8,8 +8,12 @@ "preview": "vite preview", "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", - "lint": "prettier --plugin-search-dir . --check . && eslint .", - "format": "prettier --plugin-search-dir . --write ." + "lint": "npm run eslint", + "lint:types": "npm run check", + "fmt": "npm run prettier:svelte && npm run prettier", + "eslint": "npx -p eslint@8 -- eslint .", + "prettier:svelte": "npx -p prettier@2 -- prettier --plugin-search-dir . --write .", + "prettier": "npx -p prettier@2 -- prettier --write '**/*.{js,css,md,html,json}'" }, "devDependencies": { "@sveltejs/adapter-auto": "^2.0.0",