diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 2f28f73..9c5cb8d 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,4 +1,5 @@ ### Type of Change + - [ ] New features - [ ] Bug fixes - [ ] Breaking changes @@ -7,8 +8,9 @@ - [ ] Other (please specify): ## Description + ## Screenshots or GIFs (if applicable) - + diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 0000000..78f0aea --- /dev/null +++ b/.github/workflows/pr.yml @@ -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 \ No newline at end of file diff --git a/package.json b/package.json index 59fcaf7..98204af 100644 --- a/package.json +++ b/package.json @@ -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",