Skip to content

Commit

Permalink
Merge pull request #2452 from posit-dev/sagerb-add-lint-for-webview
Browse files Browse the repository at this point in the history
Update extension linting to include webview source
  • Loading branch information
dotNomad authored Nov 21, 2024
2 parents 50829f1 + 8d9da74 commit d2afd91
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion extensions/vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@
"esbuild": "npm run esbuild-base -- --sourcemap",
"esbuild-watch": "npm run esbuild-base -- --sourcemap --watch",
"build-font": "fantasticon",
"lint": "eslint src --max-warnings 0",
"lint": "eslint src --max-warnings 0 && eslint webviews/homeView/src --max-warnings 0",
"compile": "tsc -p ./",
"test": "npm run compile && node ./out/test/runTest.js",
"test-unit": "vitest run"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions extensions/vscode/webviews/homeView/src/stores/home.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export class HostConduit {
private readonly vsCodeApi: WebviewApi<unknown>,
) {}

private rawMsgCB = (e: any) => {
private rawMsgCB = (e: MessageEvent) => {
if (this.externalMsgCB) {
const obj = JSON.parse(e.data);
if (isHostToWebviewMessage(obj)) {
Expand Down

0 comments on commit d2afd91

Please sign in to comment.