Skip to content

Commit 7d0b091

Browse files
authored
Merge pull request #56 from HiDeoo/hd-autofix
2 parents b7fd09e + 9a7440a commit 7d0b091

File tree

9 files changed

+61
-182
lines changed

9 files changed

+61
-182
lines changed

.github/workflows/autofix.yml

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: autofix.ci
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
workflow_call:
11+
12+
permissions:
13+
contents: read
14+
15+
concurrency:
16+
cancel-in-progress: true
17+
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }}
18+
19+
jobs:
20+
autofix:
21+
name: Format code
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v4
26+
27+
- name: Install pnpm
28+
uses: pnpm/action-setup@v4
29+
with:
30+
version: 8.6.12
31+
32+
- name: Install Node.js
33+
uses: actions/setup-node@v4
34+
with:
35+
cache: pnpm
36+
node-version: 18
37+
registry-url: 'https://registry.npmjs.org'
38+
39+
- name: Install dependencies
40+
run: pnpm install
41+
42+
- name: Format code
43+
run: pnpm format
44+
45+
- name: Run autofix
46+
uses: autofix-ci/action@ff86a557419858bb967097bfc916833f5647fa8c
47+
with:
48+
fail-fast: false

.github/workflows/integration.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Integration
1+
name: integration
22

33
on:
44
push:
@@ -9,6 +9,10 @@ on:
99
- main
1010
workflow_call:
1111

12+
concurrency:
13+
cancel-in-progress: true
14+
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }}
15+
1216
jobs:
1317
lint_test:
1418
name: Lint & Test

.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Release
1+
name: release
22

33
on:
44
push:

.husky/pre-commit

-4
This file was deleted.

docs/astro.config.ts

+1
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ export default defineConfig({
8585
},
8686
],
8787
social: {
88+
blueSky: 'https://bsky.app/profile/hideoo.dev',
8889
github: 'https://github.com/HiDeoo/starlight-openapi',
8990
},
9091
title: 'Starlight OpenAPI',

docs/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"build": "astro build",
1212
"preview": "astro preview",
1313
"astro": "astro",
14-
"lint": "prettier -c --cache . && eslint . --cache --max-warnings=0"
14+
"lint": "eslint . --cache --max-warnings=0",
15+
"format": "prettier -w --cache --ignore-unknown ."
1516
},
1617
"dependencies": {
1718
"@astrojs/starlight": "0.26.0",

package.json

+2-10
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,14 @@
88
"scripts": {
99
"test": "pnpm --stream -r test",
1010
"lint": "pnpm -r lint",
11-
"prepare": "husky install"
11+
"format": "pnpm -r format"
1212
},
1313
"devDependencies": {
1414
"@hideoo/eslint-config": "3.0.0",
1515
"@hideoo/prettier-config": "2.0.0",
1616
"@hideoo/tsconfig": "2.0.1",
1717
"astro": "4.11.1",
1818
"eslint": "8.56.0",
19-
"husky": "8.0.3",
20-
"lint-staged": "14.0.1",
2119
"prettier": "3.0.3",
2220
"prettier-plugin-astro": "0.12.0",
2321
"typescript": "5.1.6"
@@ -41,11 +39,5 @@
4139
"type": "git",
4240
"url": "https://github.com/HiDeoo/starlight-openapi.git"
4341
},
44-
"bugs": "https://github.com/HiDeoo/starlight-openapi/issues",
45-
"lint-staged": {
46-
"*": [
47-
"prettier -w -u --cache",
48-
"eslint --cache --no-warn-ignored --max-warnings=0"
49-
]
50-
}
42+
"bugs": "https://github.com/HiDeoo/starlight-openapi/issues"
5143
}

packages/starlight-openapi/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
},
1313
"scripts": {
1414
"test": "playwright install --with-deps chromium && playwright test",
15-
"lint": "prettier -c --cache . && eslint . --cache --max-warnings=0"
15+
"lint": "eslint . --cache --max-warnings=0",
16+
"format": "prettier -w --cache --ignore-unknown ."
1617
},
1718
"dependencies": {
1819
"@readme/openapi-parser": "2.5.0",

0 commit comments

Comments
 (0)