ci: Add check for formatting default.json
(#30034)
This PR adds a check in CI to ensure that `assets/settings/default.json` is formatted consistently. Release Notes: - N/A
This commit is contained in:
parent
bd11bb5409
commit
5002156e32
12
.github/workflows/ci.yml
vendored
12
.github/workflows/ci.yml
vendored
@ -162,13 +162,23 @@ jobs:
|
|||||||
working-directory: ./docs
|
working-directory: ./docs
|
||||||
run: |
|
run: |
|
||||||
pnpm dlx prettier@${PRETTIER_VERSION} . --check || {
|
pnpm dlx prettier@${PRETTIER_VERSION} . --check || {
|
||||||
echo "To fix, run from the root of the zed repo:"
|
echo "To fix, run from the root of the Zed repo:"
|
||||||
echo " cd docs && pnpm dlx prettier@${PRETTIER_VERSION} . --write && cd .."
|
echo " cd docs && pnpm dlx prettier@${PRETTIER_VERSION} . --write && cd .."
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
env:
|
env:
|
||||||
PRETTIER_VERSION: 3.5.0
|
PRETTIER_VERSION: 3.5.0
|
||||||
|
|
||||||
|
- name: Prettier Check on default.json
|
||||||
|
run: |
|
||||||
|
pnpm dlx prettier@${PRETTIER_VERSION} assets/settings/default.json --check || {
|
||||||
|
echo "To fix, run from the root of the Zed repo:"
|
||||||
|
echo " pnpm dlx prettier@${PRETTIER_VERSION} assets/settings/default.json --write"
|
||||||
|
false
|
||||||
|
}
|
||||||
|
env:
|
||||||
|
PRETTIER_VERSION: 3.5.0
|
||||||
|
|
||||||
# To support writing comments that they will certainly be revisited.
|
# To support writing comments that they will certainly be revisited.
|
||||||
- name: Check for todo! and FIXME comments
|
- name: Check for todo! and FIXME comments
|
||||||
run: script/check-todos
|
run: script/check-todos
|
||||||
|
3
.prettierrc
Normal file
3
.prettierrc
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"printWidth": 120
|
||||||
|
}
|
3
docs/.prettierrc
Normal file
3
docs/.prettierrc
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"printWidth": 80
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user