Skip to content

Commit c3cfc5e

Browse files
committed
ci: Fix formatting inconsistency between save and lint execution
VS Code Extension used bundled Prettier while CLI used global Prettier, causing formatting differences due to version mismatch. Added local prettier as devDependency to ensure all tools use the same version (3.6.2).
1 parent a44358d commit c3cfc5e

File tree

5 files changed

+348
-346
lines changed

5 files changed

+348
-346
lines changed

.devcontainer/post-create.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#!/bin/bash
22

33
npm install -g @anthropic-ai/claude-code
4-
npm install -g prettier
54
npm install -g baedal
65
npm install -g @vscode/vsce
76
npm install -g ovsx

.github/workflows/lint.yml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,12 @@ jobs:
3939
with:
4040
node-version: "22.18.0"
4141

42-
- name: Install Prettier globally
43-
run: npm install -g prettier
44-
4542
- uses: extractions/setup-just@v3
4643

4744
- name: Install dependencies
48-
run: just deps-extension
45+
run: |
46+
just deps-root
47+
just deps-extension
4948
5049
- name: Lint Extension
5150
run: just lint extension
@@ -62,13 +61,12 @@ jobs:
6261
with:
6362
node-version: "22.18.0"
6463

65-
- name: Install Prettier globally
66-
run: npm install -g prettier
67-
6864
- uses: extractions/setup-just@v3
6965

7066
- name: Install dependencies
71-
run: just deps-web-view
67+
run: |
68+
just deps-root
69+
just deps-web-view
7270
7371
- name: Lint Web View
7472
run: just lint web-view
@@ -85,10 +83,10 @@ jobs:
8583
with:
8684
node-version: "22.18.0"
8785

88-
- name: Install Prettier globally
89-
run: npm install -g prettier
90-
9186
- uses: extractions/setup-just@v3
9287

88+
- name: Install dependencies
89+
run: just deps-root
90+
9391
- name: Lint Config Files
9492
run: just lint config

justfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,17 @@ lint target="all":
3434
just lint justfile
3535
;;
3636
extension)
37-
prettier --write "{{ extension_dir }}/src/**/*.ts"
37+
npx prettier --write "{{ extension_dir }}/src/**/*.ts"
3838
cd "{{ extension_dir }}"
3939
yarn lint
4040
;;
4141
web-view)
42-
prettier --write "{{ web_view_dir }}/src/**/*.{ts,tsx}"
42+
npx prettier --write "{{ web_view_dir }}/src/**/*.{ts,tsx}"
4343
cd "{{ web_view_dir }}"
4444
yarn lint
4545
;;
4646
config)
47-
prettier --write "**/*.{json,yml,yaml,md}"
47+
npx prettier --write "**/*.{json,yml,yaml,md}"
4848
;;
4949
justfile)
5050
just --fmt --unstable

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@
270270
},
271271
"devDependencies": {
272272
"@vscode/vsce": "3.6.2",
273-
"ovsx": "0.10.6"
274-
},
275-
"dependencies": {}
273+
"ovsx": "0.10.6",
274+
"prettier": "3.6.2"
275+
}
276276
}

0 commit comments

Comments
 (0)