diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 00000000..4ff8a9e7 --- /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 --frozen-lockfile + + - name: Lint + run: pnpm lint diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 00000000..c32828c2 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +lts/hydrogen \ No newline at end of file diff --git a/package.json b/package.json index 8fd6a851..5b210590 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,7 @@ "name": "rpkm-frontend", "version": "0.1.0", "private": true, + "packageManager": "pnpm@8.12.1", "scripts": { "dev": "next dev", "build": "next build",