Skip to content

Commit

Permalink
Merge pull request #10 from HiDeoo/hd-autofix
Browse files Browse the repository at this point in the history
  • Loading branch information
HiDeoo authored Dec 9, 2024
2 parents 7fd6593 + 0ff543a commit 0185d09
Show file tree
Hide file tree
Showing 9 changed files with 54 additions and 200 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/autofix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
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

- name: Install Node.js
uses: actions/setup-node@v4
with:
cache: pnpm
node-version: 18

- name: Install dependencies
run: pnpm install

- name: Format code
run: pnpm format

- name: Run autofix
uses: autofix-ci/action@ff86a557419858bb967097bfc916833f5647fa8c
with:
fail-fast: false
2 changes: 1 addition & 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 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
1 change: 0 additions & 1 deletion .husky/pre-commit

This file was deleted.

1 change: 1 addition & 0 deletions docs/astro.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export default defineConfig({
{ label: 'Demo', link: '/demo/' },
],
social: {
blueSky: 'https://bsky.app/profile/hideoo.dev',
github: 'https://github.com/HiDeoo/starlight-showcases',
},
title: 'Starlight Showcases',
Expand Down
3 changes: 2 additions & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"dev": "astro dev",
"build": "astro build",
"preview": "astro preview",
"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.24.4",
Expand Down
12 changes: 2 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,14 @@
"type": "module",
"scripts": {
"lint": "pnpm -r lint",
"prepare": "husky"
"format": "pnpm -r format"
},
"devDependencies": {
"@hideoo/eslint-config": "^3.0.1",
"@hideoo/prettier-config": "^2.0.0",
"@hideoo/tsconfig": "^2.0.1",
"astro": "^4.9.1",
"eslint": "^8.57.0",
"husky": "^9.0.11",
"lint-staged": "^15.2.4",
"prettier": "^3.2.5",
"prettier-plugin-astro": "^0.13.0",
"typescript": "^5.4.5"
Expand All @@ -40,11 +38,5 @@
"type": "git",
"url": "https://github.com/HiDeoo/starlight-showcases.git"
},
"bugs": "https://github.com/HiDeoo/starlight-showcases/issues",
"lint-staged": {
"*": [
"prettier -w -u --cache",
"eslint --cache --no-warn-ignored --max-warnings=0"
]
}
"bugs": "https://github.com/HiDeoo/starlight-showcases/issues"
}
3 changes: 2 additions & 1 deletion packages/starlight-showcases/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"./package.json": "./package.json"
},
"scripts": {
"lint": "prettier -c --cache . && eslint . --cache --max-warnings=0"
"lint": "eslint . --cache --max-warnings=0",
"format": "prettier -w --cache --ignore-unknown ."
},
"dependencies": {
"@astro-community/astro-embed-twitter": "^0.5.4",
Expand Down
Loading

0 comments on commit 0185d09

Please sign in to comment.