Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): improve pull request and bump oxlint jobs #172

Merged
merged 7 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/bump_oxlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ jobs:
pnpm update --latest oxlint
pnpm run clone
pnpm run generate # Generate rules from latest oxlint
pnpm run format # run prettier over it
pnpm run test -u # Update test snapshots
pnpm run build # build cjs, mjs and d.ts files
npm version ${{ inputs.version }} --no-git-tag-version

- uses: peter-evans/create-pull-request@v7
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Format (prettier)

on:
pull_request:
types: [opened, synchronize]
push:
branches:
- main
- 'renovate/**'

jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Run Format (prettier)
run: npx prettier . --check
23 changes: 23 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Lint

on:
pull_request:
types: [opened, synchronize]
push:
branches:
- main
- 'renovate/**'

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: ./.github/actions/pnpm

- name: Run oxlint
run: npx oxlint

- name: Run eslint
run: npx eslint
3 changes: 0 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,5 @@ jobs:

- uses: ./.github/actions/pnpm

- name: Run Linters
run: pnpm run lint

- name: Run tests
run: pnpm run test --coverage
3 changes: 1 addition & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
pnpm-lock.yaml
rules.js
rules.cjs
lib/
~
2 changes: 1 addition & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ export default [
eslintConfigPrettier,
oxlint.configs['flat/all'],
{
ignores: ["lib/"]
ignores: ['lib/'],
},
];