undo linting changes
This commit is contained in:
parent
4277e6db4b
commit
518c930eb2
1 changed files with 37 additions and 44 deletions
81
.github/workflows/lint.yml
vendored
81
.github/workflows/lint.yml
vendored
|
|
@ -1,60 +1,53 @@
|
||||||
name: Lint Codebase
|
name: Lint Codebase
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint:
|
lint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- uses: actions/checkout@v4
|
||||||
uses: actions/checkout@v4
|
if: github.event_name == 'pull_request'
|
||||||
with:
|
with:
|
||||||
fetch-depth: 1
|
ref: ${{ github.head_ref }}
|
||||||
|
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||||
|
|
||||||
- name: Setup Bun
|
- uses: actions/checkout@v4
|
||||||
uses: oven-sh/setup-bun@v1
|
if: github.event_name != 'pull_request'
|
||||||
with:
|
|
||||||
bun-version: latest
|
|
||||||
|
|
||||||
- name: Cache dependencies
|
- name: Use Node.js
|
||||||
uses: actions/cache@v3
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
path: |
|
node-version: '20'
|
||||||
./bun_modules
|
cache: 'npm'
|
||||||
./node_modules
|
|
||||||
./bun.lock
|
|
||||||
key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock') }}
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: bun install --frozen-lockfile
|
run: npm ci
|
||||||
|
|
||||||
- name: Run JS Lint
|
- name: Fix JS Lint
|
||||||
run: bun run lint:js -- --fix
|
run: npm run lint:js -- --fix
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
- name: Run CSS Lint
|
- name: Fix CSS Lint
|
||||||
run: bun run lint:css -- --fix
|
run: npm run lint:css -- --fix
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
- name: Format with Prettier
|
- name: Format with Prettier
|
||||||
run: bun run format
|
run: npm run format
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
- name: Commit and Push lint fixes
|
- name: Commit and Push changes
|
||||||
uses: stefanzweifel/git-auto-commit-action@v5
|
uses: stefanzweifel/git-auto-commit-action@v5
|
||||||
with:
|
with:
|
||||||
commit_message: 'style: auto-fix linting issues'
|
commit_message: 'style: auto-fix linting issues'
|
||||||
commit_user_name: 'github-actions[bot]'
|
|
||||||
commit_user_email: 'github-actions[bot]@users.noreply.github.com'
|
|
||||||
only_if_changed: true
|
|
||||||
|
|
||||||
- name: Run HTML Lint
|
- name: Run HTML Lint
|
||||||
run: bun run lint:html
|
run: npm run lint:html
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue