Fix VS Code extension strict comparison lint warnings#15837
Draft
Fix VS Code extension strict comparison lint warnings#15837
Conversation
Agent-Logs-Url: https://github.com/microsoft/aspire/sessions/835f6224-1f25-4e7c-9675-44344ac8fd0c Co-authored-by: radical <1472+radical@users.noreply.github.com>
Agent-Logs-Url: https://github.com/microsoft/aspire/sessions/835f6224-1f25-4e7c-9675-44344ac8fd0c Co-authored-by: radical <1472+radical@users.noreply.github.com>
Agent-Logs-Url: https://github.com/microsoft/aspire/sessions/835f6224-1f25-4e7c-9675-44344ac8fd0c Co-authored-by: radical <1472+radical@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
radical
April 3, 2026 06:12
View session
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 15837Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 15837" |
adamint
approved these changes
Apr 3, 2026
| export function getResourceIcon(resource: ResourceJson): vscode.ThemeIcon { | ||
| const state = resource.state; | ||
| const health = resource.healthStatus; | ||
| const hasNonZeroExitCode = resource.exitCode !== null && resource.exitCode !== undefined && resource.exitCode !== 0; |
Member
There was a problem hiding this comment.
all these changes are fine, i just wonder if it might be better to add a type guard and avoid all the duplication?
ie,
function isNotNullOrUndefined<T>(val: T | undefined | null): val is T {
return val !== undefined && val !== null;
}
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.
Description
Fixes the remaining VS Code extension lint warnings caused by non-strict
!= nullcomparisons in the App Host tree provider, code lens provider, and gutter decoration provider.This keeps the existing exit-code behavior while aligning the checks with the extension lint rules.
Validation:
parallel_validation(Code Review + CodeQL) ✅npm run lintcould not be executed in this sandbox becausenpm cifailed on blocked network access while downloading packagescc @adamint
Fixes # (issue)
Checklist
<remarks />and<code />elements on your triple slash comments?aspire.devissue: