Skip to content

chore: tooling updates#125

Open
GabrielCousin wants to merge 9 commits into
mainfrom
gabrielcousin/-/tooling-updates
Open

chore: tooling updates#125
GabrielCousin wants to merge 9 commits into
mainfrom
gabrielcousin/-/tooling-updates

Conversation

@GabrielCousin
Copy link
Copy Markdown
Member

@GabrielCousin GabrielCousin commented Apr 3, 2026

Summary

A batch of developer tooling and CI modernisation tasks, grouped into 9 thematic commits:

  1. chore: clean up docs and add issue templates — Lowercase .MD.md doc extensions; remove stale duplicate bug-report template; add feature-request issue template.
  2. chore: update pre-commit, pin Node 22, and switch to npm — Update ggshield pre-commit pin to v1.49.0; pin Node 22 via .mise.toml; declare engines.node >= 20; switch from Yarn to npm with .npmrc.
  3. chore: add Dependabot config with monthly schedule and cooldown — Add monthly Dependabot schedule with grouping/cooldown.
  4. chore: migrate CI to jdx/mise-action@v2 and npm — Migrate to mise-action@v2; drop global vsce install in favour of npx; fix test matrix for all platforms.
  5. chore(test): migrate to @vscode/test-cli, sinon, and mocha v11 — Replace legacy runTest.ts/suite/index.ts with @vscode/test-cli (.vscode-test.mjs); replace simple-mock with sinon; upgrade Mocha to v11; add childProcess abstraction for stubbing.
  6. chore: migrate ESLint to v9 flat config and enforce strict types — Migrate from .eslintrc.json to ESLint v9 flat config (eslint.config.mjs) + typescript-eslint v8; enforce no-explicit-any; replace remaining any types with proper types across src/.
  7. fix: use correct 'supported' key for untrustedWorkspaces capability — Fix typo in package.json capabilities declaration.
  8. chore: restructure tsconfig with explicit src/test projects — Split tsconfig into explicit src/ and test/ project references.
  9. chore: add esbuild bundler and consolidate output to dist/ — Bundle extension with esbuild; consolidate output to dist/; update .vscodeignore accordingly.

Test plan

  • npm install succeeds from a clean checkout
  • npm run lint passes with no errors
  • npm run compile succeeds
  • CI workflow passes (build + test jobs green on Linux, macOS, Windows)
  • Extension tests pass via @vscode/test-cli runner

⚠️ Should be synced with #140

@GabrielCousin GabrielCousin force-pushed the gabrielcousin/-/tooling-updates branch from e9a501b to b6e0130 Compare April 3, 2026 12:03
@GabrielCousin GabrielCousin force-pushed the gabrielcousin/-/tooling-updates branch 2 times, most recently from 67cad5e to 2a06255 Compare April 17, 2026 20:53
@GabrielCousin GabrielCousin force-pushed the gabrielcousin/-/tooling-updates branch 6 times, most recently from 290e04a to 6e2b983 Compare May 12, 2026 10:18
@GabrielCousin
Copy link
Copy Markdown
Member Author

Code review

Found 2 issues:

  1. pretest overwrites the esbuild bundle before tests run. pretest runs npm run compile (esbuild → bundled dist/extension.js) and then tsc -p tsconfig.test.json, which has outDir: "dist" and include: ["src/**/*.ts"], so it re-emits an unbundled dist/extension.js on top of the bundle. Tests therefore run against the unbundled tree rather than the artifact that ships, masking bundle-only regressions (externals, tree-shaking, module resolution). Suggest narrowing tsconfig.test.json include to src/test/**/*.ts or emitting to a separate outDir.

"check": "tsc --noEmit -p ./tsconfig.src.json && tsc --noEmit -p ./tsconfig.test.json",
"lint": "eslint src",
"pretest": "npm run check && npm run compile && tsc -p tsconfig.test.json",
"test": "vscode-test"

{
"extends": "./tsconfig.src.json",
"compilerOptions": {
"types": ["node", "mocha"],
"outDir": "dist"
},
"include": ["src/**/*.ts"],
"exclude": []
}

  1. ESLint is skipped in CI but never run elsewhere. The pre-commit job sets SKIP: ggshield,eslint # already done by other jobs. ggshield is indeed covered by the scanning job, but no other job runs npm run lint — neither build-and-test nor pretest invoke ESLint. The comment is misleading for eslint, and lint errors will only be caught by the local pre-commit hook (which contributors may not have installed). Either run npm run lint in build-and-test or remove eslint from the SKIP list.

- name: Run pre-commit
run: pipx run pre-commit run --all-files --show-diff-on-failure
env:
SKIP: ggshield,eslint # already done by other jobs
build-and-test:

🤖 Generated with Claude Code

- If this code review was useful, please react with 👍. Otherwise, react with 👎.

- npm and github-actions ecosystems, monthly schedule
- 3-day cooldown on all updates (supply-chain protection)
- Groups: typescript-eslint, vscode

Refs: FRNT-1207
- Replace actions/setup-node@v4 (hardcoded versions) with mise-action@v2
  so CI picks up the Node version from .mise.toml
- Switch yarn → npm ci for installs
- Update vsce install to @vscode/vsce (current package name)
- Remove XQuartz install step (handled in next commit with test-cli)

Refs: FRNT-1209
Split tsconfig.json into a solution-style config referencing tsconfig.src.json
(extension source) and tsconfig.test.json (tests, adds mocha types). Explicit
types fields ensure @types/node and @types/mocha are reliably resolved by both
tsc and VS Code. Update compile, compile-tests, check, and watch scripts
accordingly. ESLint parserOptions now reference both concrete configs.
@GabrielCousin GabrielCousin force-pushed the gabrielcousin/-/tooling-updates branch from 6e2b983 to 4567cb0 Compare May 13, 2026 19:36
@GabrielCousin GabrielCousin self-assigned this May 18, 2026
@GabrielCousin GabrielCousin marked this pull request as ready for review May 18, 2026 07:22
@GabrielCousin GabrielCousin requested a review from a team as a code owner May 18, 2026 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant