Clean up unused code and release packaging#134
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR tightens TypeScript hygiene and reduces extension package contents by enabling unused-local/parameter checks, removing dead code and redundant dependencies they expose, reusing the shared CF_HTML clipboard formatter, and excluding development artifacts from VSIX packaging.
Changes:
- Enabled
noUnusedLocals/noUnusedParametersfor both regular and integration TS builds, then removed or de-exported newly-detected unused members. - Reused the shared
formatCfHtmlhelper for copied queries, eliminating the duplicated CF_HTML implementation. - Simplified packaging by relying on npm’s
prepackagelifecycle (avoiding double builds) and excluding test inputs /.kqr/ integration config from the VSIX.
Reviewed changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/Client/tsconfig.json | Enables unused locals/parameters checks for the client TS build. |
| src/Client/tsconfig.integration.json | Enables unused locals/parameters checks for integration TS build. |
| src/Client/package.json | Avoids double-running prepackage when running npm run package; removes redundant TypeScript ESLint direct deps; formatting-only schema reflow. |
| src/Client/package-lock.json | Removes lock entries for the removed direct TypeScript ESLint deps. |
| src/Client/features/server.ts | Removes unused import and makes request param interfaces internal-only. |
| src/Client/features/resultsViewer.ts | Removes unused exports/state and simplifies HTML builder call/signature. |
| src/Client/features/queryEditor.ts | Reuses shared formatCfHtml for clipboard HTML copy; removes duplicated helper; marks unused params with _. |
| src/Client/features/plotlyChartProvider.ts | Replaces magic string axis side with existing constant. |
| src/Client/features/copilot.ts | Marks unused chat handler context param with _ for TS unused-parameter compliance. |
| src/Client/features/connectionsPanel.ts | Marks unused parameters with _ for TS unused-parameter compliance. |
| src/Client/features/connectionManager.ts | Makes storage key constants internal-only (no longer exported). |
| src/Client/.vscodeignore | Excludes tests/integration inputs, .kqr, and related dev files from packaged VSIX. |
Files not reviewed (1)
- src/Client/package-lock.json: Generated file
giltayar
approved these changes
Jul 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
prepackagebuild twice when invokingnpm run packageValidation
npm cinpm auditnpm run type-checknpm run lintnpm test— 502 passednpm run build-release-servernpm run test:integration— 46 passeddotnet build src/Server/Server.csproj -c Release -warnaserrordotnet run --project src/ServerTests/ServerTests.csproj -c Release— 200 passednpm run package— packaged version 1.0.1 as a 114-file VSIX; verified tests, test configuration,.kqr, and nested.vsixfiles are absentNotes