Skip to content

Commit 5ffe0a7

Browse files
committed
ci: add task prettier-lint
1 parent a1dbed9 commit 5ffe0a7

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Taskfile.yaml

+8-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ vars:
66
SDK_PATH: ".nixpkgs/vendor/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk"
77
FRAMEWORK_PATH: "{{.SDK_PATH}}/System/Library/Frameworks"
88
C_ENV: "{{OS | upper}}_{{ARCH | upper}}"
9+
PRETTIER_TARGETS: "*.{yaml,md,json} **/*.{yaml,md,json}"
910

1011
env:
1112
HOSTNAME:
@@ -41,6 +42,7 @@ tasks:
4142
- renovate-lint
4243
- actions-lint
4344
- goreleaser-lint
45+
- prettier-lint
4446

4547
test:
4648
desc: Runs all test targets
@@ -145,7 +147,12 @@ tasks:
145147
prettier-format:
146148
desc: Formats YAML, JSON, and Markdown files
147149
cmds:
148-
- prettier --config ./.prettierrc.yaml -w *.{yaml,md,json} **/*.{yaml,md,json}
150+
- prettier --config ./.prettierrc.yaml -w {{.PRETTIER_TARGETS}}
151+
152+
prettier-lint:
153+
desc: Lints YAML, JSON, and Markdown files
154+
cmds:
155+
- prettier --config ./.prettierrc.yaml --check {{.PRETTIER_TARGETS}}
149156

150157
pull-upstream:
151158
desc: Pulls upstream KCL CLI

0 commit comments

Comments
 (0)