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
Show file tree
Hide file tree
Changes from all commits
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
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",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks for adding this!

Copy link
Collaborator

Choose a reason for hiding this comment

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

"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) => {
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)) {
Expand Down