Skip to content

Commit

Permalink
feat: add pr template and lint workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
punchanabu committed Aug 31, 2024
1 parent 646604c commit 61f61e9
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
### Type of Change

- [ ] New features
- [ ] Bug fixes
- [ ] Breaking changes
Expand All @@ -7,8 +8,9 @@
- [ ] Other (please specify):

## Description

<!-- what did you do ? -->

## Screenshots or GIFs (if applicable)
<!-- Add any relevant screenshots or GIFs that demonstrate the changes made. -->

<!-- Add any relevant screenshots or GIFs that demonstrate the changes made. -->
32 changes: 32 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Lint Pull Request

on:
pull_request:
types: ['opened', 'edited', 'reopened', 'synchronize']

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- uses: pnpm/action-setup@v2

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: pnpm

- name: Install dependencies
run: pnpm install

- name: Lint
run: pnpm lint
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"test": "vitest",
"lint": "prettier --check . && eslint .",
"format": "prettier --write ."
"format": "prettier --write .",
"fix": "prettier --write . && eslint . --fix"
},
"devDependencies": {
"@sveltejs/adapter-auto": "^3.2.4",
Expand Down

0 comments on commit 61f61e9

Please sign in to comment.