Codebase cleanup: strict ESLint, CLI refactoring, versioned installer#7
Merged
Conversation
- Add async keyword to getCliVersion in cliInstaller.ts - Extract isVersionMatch helper from ensureCliInstalled in extension.ts to stay under 20-line limit
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.
TLDR;
Comprehensive cleanup pass: strict ESLint rules across the VsCode extension, CLI refactoring for maintainability, versioned CLI installer, and expanded test coverage.
Details
eslint-rules.cjswith all TypeScript-ESLint rules set to error. Updatedeslint.config.mjsto use it. Fixed all violations across every extension source file (sorted imports, const declarations, removed type assertions, array-simple style, explicit member accessibility).printNdjson,formatAndExit,runDirectory,mergeVarshelpers inProgram.fs. Cleaned upRunner.fsandOutput.fs.--versionflag. Extension checks installed version againstCLI_REQUIRED_VERSIONconstant and re-downloads on mismatch. Download URLs pinned to version tag.build-vsix.sh(universal VSIX, no bundled CLI), updatedbuild-cli.shandbuild-all.shwith version verification, cleaned upclean-install.sh.htmlUtils.test.tsunit test suite. Improved e2e tests with additional assertions and lint compliance. Addedecommerce-spec.jsontest fixture.watchers.tsfor file watcher setup,LICENSE(MIT),docs/vsix-binary-audit.mdaudit document.scripts/package.sh.How do the tests prove the change works
htmlUtils.test.tsvalidates all HTML utility functions (report generation, escaping, formatting) with comprehensive assertions