Skip to content

Commit 5c7db2a

Browse files
authored
add svelte-check to github workflows (#69)
# Problem Add svelte-check to github workflows and resolve any errors. Also add prettier checks. closes #67 ## Steps to Verify: 1. See that svelte-check is running in the github checks below. 2. See that prettier is running in the github checks below. --------- Co-authored-by: Claire Olmstead <olmsteadclaire@gmail.com>
1 parent 6e867c1 commit 5c7db2a

File tree

3 files changed

+59
-0
lines changed

3 files changed

+59
-0
lines changed

.github/workflows/prettier.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
2+
name: Prettier checks
3+
on:
4+
push:
5+
branches: ['main', '67-add-svelte-check-to-github-workflows---styleguide']
6+
pull_request:
7+
branches: ['main', '67-add-svelte-check-to-github-workflows---styleguide']
8+
9+
jobs:
10+
prettier:
11+
name: Prettier
12+
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Use Node.js
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: 20
23+
cache: 'npm'
24+
25+
- name: Install Dependencies
26+
run: npm ci
27+
28+
- name: Check formatting with Prettier
29+
run: npm run prettier:check:ci

.github/workflows/svelte-check.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
2+
name: Svelte Check
3+
on:
4+
push:
5+
branches: ['main', 'feat/svelte-app']
6+
pull_request:
7+
branches: ['main', 'feat/svelte-app']
8+
9+
jobs:
10+
prettier:
11+
name: Svelte Check
12+
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Use Node.js
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: 20
23+
cache: 'npm'
24+
25+
- name: Install Dependencies
26+
run: npm ci
27+
28+
- name: Check svelte/ts with svelte-check
29+
run: npm run check

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"lint:fix": "eslint --fix",
3030
"format": "npm run prettier && npm run lint:fix",
3131
"prettier": "prettier --write --plugin prettier-plugin-svelte --plugin prettier-plugin-tailwindcss src",
32+
"prettier:check:ci": "npx prettier --check --plugin prettier-plugin-tailwindcss --plugin prettier-plugin-svelte src",
3233
"check": "svelte-check --tsconfig ./tsconfig.json"
3334
},
3435
"devDependencies": {

0 commit comments

Comments
 (0)