Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update extension linting to include webview source #2452

Merged
merged 2 commits into from
Nov 21, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Resolve ESLint issues
sagerb committed Nov 20, 2024
commit 8d9da7430f83a77ddbfffc1f554a9a0dfd354808
Original file line number Diff line number Diff line change
@@ -119,7 +119,7 @@ const onRefreshContentRecordDataMsg = (msg: RefreshContentRecordDataMsg) => {
const home = useHomeStore();
home.contentRecords = msg.content.contentRecords;

let selector = msg.content.deploymentSelected;
const selector = msg.content.deploymentSelected;
if (selector === null) {
home.selectedContentRecord = undefined;
return;
4 changes: 2 additions & 2 deletions extensions/vscode/webviews/homeView/src/stores/home.ts
Original file line number Diff line number Diff line change
@@ -95,7 +95,7 @@ export const useHomeStore = defineStore("home", () => {

watch(
[selectedContentRecord, selectedConfiguration],
([contentRecord, config], [prevContentRecord, prevConfig]) => {
([contentRecord, config], [prevContentRecord]) => {
const result = new Map<string, string | undefined>();

if (config === undefined || isConfigurationError(config)) {
@@ -277,7 +277,7 @@ export const useHomeStore = defineStore("home", () => {
isMissingRequirements: computed(() => {
return pythonProject.value && !pythonPackageFile.value;
}),
isAlertActive: computed((): Boolean => {
isAlertActive: computed((): boolean => {
return (
python.active.isEmptyRequirements.value ||
python.active.isMissingRequirements.value
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ export class HostConduit {
private readonly vsCodeApi: WebviewApi<unknown>,
) {}

private rawMsgCB = (e: any) => {
private rawMsgCB = (e: MessageEvent) => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Woohoo 1 less any 🎉

if (this.externalMsgCB) {
const obj = JSON.parse(e.data);
if (isHostToWebviewMessage(obj)) {