-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update all files to work with svelte-check (#201)
## Goal The goal of this PR is to add svelte-check to the github workflows and resolve errors. Closes #200 ## Checklist - [x] PR Self-Review and Commenting - [ ] Docs updated - [ ] Tests added ## How To Test the Changes 1. Clone the pr branch 2. ... --------- Co-authored-by: Claire Olmstead <olmsteadclaire@gmail.com>
- Loading branch information
1 parent
00be832
commit 9e7cefe
Showing
15 changed files
with
97 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json | ||
name: Svelte Check | ||
on: | ||
push: | ||
branches: ['main', 'feat/svelte-app'] | ||
pull_request: | ||
branches: ['main', 'feat/svelte-app'] | ||
|
||
jobs: | ||
prettier: | ||
name: Svelte Check | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: 'npm' | ||
|
||
- name: Install Dependencies | ||
run: npm ci | ||
|
||
- name: Check svelte/ts with svelte-check | ||
run: npm run check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,16 @@ | ||
<script lang="ts"> | ||
import { preventDefault } from 'svelte/legacy'; | ||
interface Props { | ||
title?: string; | ||
action?: () => void; | ||
[key: string]: unknown; | ||
} | ||
let { title = '', action = () => {}, ...rest }: Props = $props(); | ||
function handleOnClick(e: Event) { | ||
e.preventDefault(); | ||
action(); | ||
} | ||
</script> | ||
|
||
<button onclick={preventDefault(action)} class="btn-primary" {...rest}>{title}</button> | ||
<button onclick={handleOnClick} class="btn-primary" {...rest}>{title}</button> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
<script lang="ts"> | ||
import BecomeAProvider from '$components/BecomeAProvider.svelte'; | ||
let { children } = $props(); | ||
</script> | ||
|
||
<slot /> | ||
<div> | ||
{@render children()} | ||
</div> |
4 changes: 2 additions & 2 deletions
4
src/routes/become-a-provider/[[network=networks]]/+layout.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<script> | ||
let { data, children } = $props(); | ||
<script lang="ts"> | ||
let { children } = $props(); | ||
</script> | ||
|
||
<div> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<script> | ||
<script lang="ts"> | ||
import BecomeAProvider from '$components/BecomeAProvider.svelte'; | ||
</script> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
// stores.js for Vitest | ||
import { vi } from 'vitest'; | ||
|
||
vi.mock('$app/navigation'); |