Skip to content

Commit 8ed1cbf

Browse files
committed
Replace formatting workflow with configured pre-commit.
1 parent 4b31549 commit 8ed1cbf

File tree

2 files changed

+26
-46
lines changed

2 files changed

+26
-46
lines changed

.github/workflows/formatting.yml

Lines changed: 0 additions & 46 deletions
This file was deleted.

.pre-commit-config.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,32 @@ repos:
1616
rev: v4.0.0-alpha.8
1717
hooks:
1818
- id: prettier
19+
entry: pnpm prettier --write --plugin=prettier-plugin-astro
1920
args: ["--tab-width", "2", "--trailing-comma", "es5"]
2021
additional_dependencies: ["prettier", "prettier-plugin-astro"]
2122
exclude: "pnpm-lock.yaml"
23+
24+
- repo: local
25+
hooks:
26+
- id: local_prettier
27+
name: prettier
28+
entry: pnpm prettier --check --plugin=prettier-plugin-astro
29+
language: node
30+
types_or: ["text"]
31+
exclude_types: ["editorconfig", "gitignore"]
32+
additional_dependencies: ["prettier", "prettier-plugin-astro"]
33+
34+
- id: astro-check
35+
name: astro check
36+
entry: astro check
37+
language: node
38+
files: "^(?:public|src)/.+|astro\\.config\\.mjs|tsconfig\\.json"
39+
pass_filenames: false
40+
additional_dependencies: ["astro", "@astrojs/check"]
41+
- id: astro-build
42+
name: astro build
43+
entry: astro build
44+
language: node
45+
files: "^(?:public|src)/.+|astro\\.config\\.mjs|tsconfig\\.json"
46+
pass_filenames: false
47+
additional_dependencies: ["astro"]

0 commit comments

Comments
 (0)