-
Notifications
You must be signed in to change notification settings - Fork 13
39 lines (32 loc) · 963 Bytes
/
lint.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Lint
on:
pull_request:
push:
branches:
- main
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Run linters
uses: sibiraj-s/action-eslint@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
eslint-args: '--quiet'
annotations: true
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Run formatters
run: 'bunx prettier --check "src/**/*.{js,ts,html,svelte,css}" --ignore-path ./.prettierignore'
- name: Check if files are formatted correctly
if: failure()
run: echo "Some files are not formatted correctly. Please run 'bun run format' to fix them."