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

Conversation

sagerb
Copy link
Collaborator

@sagerb sagerb commented Nov 20, 2024

Intent

Somehow, we overlooked that the code within the webviews/homeView/src was not being scanned by ESLint. I discovered it while working on the files within VSCode (which was configured to run the ESLint configuration on the homeView files.

Type of Change

    • Bug Fix
    • New Feature
    • Breaking Change
    • Documentation
    • Refactor
    • Tooling

Approach

This PR implements a very quick change to add that scanning to the existing lint script within the extension's package.json file, as well as resolve the discovered issues once it has been run.

User Impact

No impact to users.

@@ -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 🎉

@@ -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.

@dotNomad dotNomad merged commit d2afd91 into main Nov 21, 2024
14 checks passed
@dotNomad dotNomad deleted the sagerb-add-lint-for-webview branch November 21, 2024 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants