Skip to content

Commit

Permalink
chore: use autofix
Browse files Browse the repository at this point in the history
  • Loading branch information
HiDeoo committed Dec 9, 2024
1 parent 48fee87 commit 9a7440a
Show file tree
Hide file tree
Showing 8 changed files with 60 additions and 182 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/autofix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: autofix.ci

on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_call:

permissions:
contents: read

concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }}

jobs:
autofix:
name: Format code
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 8.6.12

- name: Install Node.js
uses: actions/setup-node@v4
with:
cache: pnpm
node-version: 18
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
run: pnpm install

- name: Format code
run: pnpm format

- name: Run autofix
uses: autofix-ci/action@ff86a557419858bb967097bfc916833f5647fa8c
with:
fail-fast: false
6 changes: 5 additions & 1 deletion .github/workflows/integration.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Integration
name: integration

on:
push:
Expand All @@ -9,6 +9,10 @@ on:
- main
workflow_call:

concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }}

jobs:
lint_test:
name: Lint & Test
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release
name: release

on:
push:
Expand Down
4 changes: 0 additions & 4 deletions .husky/pre-commit

This file was deleted.

3 changes: 2 additions & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"build": "astro build",
"preview": "astro preview",
"astro": "astro",
"lint": "prettier -c --cache . && eslint . --cache --max-warnings=0"
"lint": "eslint . --cache --max-warnings=0",
"format": "prettier -w --cache --ignore-unknown ."
},
"dependencies": {
"@astrojs/starlight": "0.26.0",
Expand Down
12 changes: 2 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,14 @@
"scripts": {
"test": "pnpm --stream -r test",
"lint": "pnpm -r lint",
"prepare": "husky install"
"format": "pnpm -r format"
},
"devDependencies": {
"@hideoo/eslint-config": "3.0.0",
"@hideoo/prettier-config": "2.0.0",
"@hideoo/tsconfig": "2.0.1",
"astro": "4.11.1",
"eslint": "8.56.0",
"husky": "8.0.3",
"lint-staged": "14.0.1",
"prettier": "3.0.3",
"prettier-plugin-astro": "0.12.0",
"typescript": "5.1.6"
Expand All @@ -41,11 +39,5 @@
"type": "git",
"url": "https://github.com/HiDeoo/starlight-openapi.git"
},
"bugs": "https://github.com/HiDeoo/starlight-openapi/issues",
"lint-staged": {
"*": [
"prettier -w -u --cache",
"eslint --cache --no-warn-ignored --max-warnings=0"
]
}
"bugs": "https://github.com/HiDeoo/starlight-openapi/issues"
}
3 changes: 2 additions & 1 deletion packages/starlight-openapi/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
},
"scripts": {
"test": "playwright install --with-deps chromium && playwright test",
"lint": "prettier -c --cache . && eslint . --cache --max-warnings=0"
"lint": "eslint . --cache --max-warnings=0",
"format": "prettier -w --cache --ignore-unknown ."
},
"dependencies": {
"@readme/openapi-parser": "2.5.0",
Expand Down
Loading

0 comments on commit 9a7440a

Please sign in to comment.