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

20240703.0 #21264

Merged
merged 7 commits into from
Jul 3, 2024
Merged

20240703.0 #21264

merged 7 commits into from
Jul 3, 2024

Conversation

bramkragten
Copy link
Member

@bramkragten bramkragten commented Jul 3, 2024

Summary by CodeRabbit

  • New Features

    • Added DEV_CONTAINER environment variable for enhanced development container setup.
    • Introduced dynamic column ordering and visibility management in data tables.
    • Expanded attribute handling capabilities in various entity classes.
  • Bug Fixes

    • Adjusted server listen host for development containers.
    • Improved image rendering logic in Lovelace Area and Media Control Cards.
  • Chores

    • Removed obsolete Safari 14 patch imports across multiple entry points.
    • Updated project version in pyproject.toml.
  • Enhancements

    • Added logging for entity service calls for better debugging.

Copy link
Contributor

coderabbitai bot commented Jul 3, 2024

Walkthrough

Walkthrough

This update introduces several significant changes across the project's files. A new environment variable DEV_CONTAINER is added to streamline development within containers. New functions and enhancements support this, including logic changes to handle development container-specific behavior. Various improvements and clean-ups, such as removing deprecated imports and modifying functions for better attribute handling, are also present. Additionally, several new methods and reorganizations enhance the logic and structure within the application, particularly around user interface components and test entities.

Changes

File(s) Change Summary
.devcontainer/devcontainer.json Added new environment variable DEV_CONTAINER with value "1".
build-scripts/.../env.cjs Introduced a new isDevContainer function to check for DEV_CONTAINER in process.env.
build-scripts/.../webpack.js Adjusted listenHost parameter to adapt based on dev container status.
cast/src/launcher/entrypoint.ts, demo/src/entrypoint.ts, hassio/src/entrypoint.ts, ... Removed import of safari-14-attachshadow-patch and reordered import statements.
pyproject.toml Updated version from 20240702.0 to 20240703.0.
src/components/.../dialog-data-table-settings.ts Enhanced DialogDataTableSettings class for dynamic column management.
src/entrypoints/.../authorize.ts, src/entrypoints/.../core.ts, ... Removed import of safari-14-attachshadow-patch.
src/fake_data/entity.ts Introduced CAPABILITY_ATTRIBUTES and enhanced Entity class and its subclasses to handle attributes.
src/fake_data/provide_hass.ts Added logging before calling a service.
src/panels/lovelace/.../hui-area-card.ts Adjusted logic relating to image rendering and aspect ratios.
src/panels/lovelace/.../hui-media-control-card.ts Removed getLayoutOptions method.

Sequence Diagram(s)

sequenceDiagram
    participant Developer as Developer
    participant Container as Dev Container
    participant DevServer as Development Server
    participant Application as Application

    Developer->>Container: Start Dev Environment
    Container->>DevServer: set DEV_CONTAINER=1
    Container->>DevServer: Start with DEV_CONTAINER

    alt DEV_CONTAINER is set
        DevServer->>Application: Initialize with `listenHost` as "0.0.0.0"
    else
        DevServer->>Application: Initialize with default `listenHost`
    end

    Application-->>Developer: Ready for Development
Loading
sequenceDiagram
    participant Application as Application
    participant LogService as Log Service
    participant Service as Any Service

    Application->>Service: Call Service
    Application->>LogService: Log Service Call Details
    LogService-->>Application: Logged Successfully
    Service-->>Application: Service Response
Loading

Tip

AI model upgrade

gpt-4o model for reviews and chat is now live

OpenAI claims that this model is better at understanding and generating code than the previous models. Please join our Discord Community to provide any feedback or to report any issues.


Recent review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE

Commits

Files that changed from the base of the PR and between 28ced4b and 57e48e2.

Files selected for processing (16)
  • .devcontainer/devcontainer.json (1 hunks)
  • build-scripts/env.cjs (1 hunks)
  • build-scripts/gulp/webpack.js (1 hunks)
  • cast/src/launcher/entrypoint.ts (1 hunks)
  • demo/src/entrypoint.ts (1 hunks)
  • hassio/src/entrypoint.ts (1 hunks)
  • pyproject.toml (1 hunks)
  • src/components/data-table/dialog-data-table-settings.ts (1 hunks)
  • src/entrypoints/authorize.ts (1 hunks)
  • src/entrypoints/core.ts (1 hunks)
  • src/entrypoints/custom-panel.ts (1 hunks)
  • src/entrypoints/onboarding.ts (1 hunks)
  • src/fake_data/entity.ts (8 hunks)
  • src/fake_data/provide_hass.ts (1 hunks)
  • src/panels/lovelace/cards/hui-area-card.ts (3 hunks)
  • src/panels/lovelace/cards/hui-media-control-card.ts (2 hunks)
Additional context used
Path-based instructions (1)
build-scripts/env.cjs (4)

Pattern */**(html|markdown|md): - For instructional content in documentation, use a direct and authoritative tone. Avoid expressions of politeness such as 'may' or 'please', and ensure the goal of the instruction is fronted.

  • Apply the Microsoft Style Guide to ensure documentation maintains clarity and conciseness.
  • In step-by-step instructions, front the location phrase in the instructional sentence.
  • In step-by-step instructions, front the 'goal' in the instructional sentence.
  • In step-by-step instructions, if in doubt what to front, front the 'goal' before the location phrase in the instructional sentence.
  • do not hyphenate terms like 'top-right' or 'bottom-left' with 'corner'

Pattern */**(html|markdown|md): - Use bold to mark UI strings.

  • If "" are used to mark UI strings, replace them by bold.

Pattern */**(html|markdown|md): - Be brief in your replies and don't add fluff like "thank you for..." and "Please let me know if"


Pattern */**(html|markdown|md): - Use sentence-style capitalization also in headings.

Biome
src/entrypoints/core.ts

[error] 30-30: Unexpected any. Specify a different type.

any disables many type checking rules. Its use should be avoided.

(lint/suspicious/noExplicitAny)

src/components/data-table/dialog-data-table-settings.ts

[error] 215-215: Unexpected any. Specify a different type.

any disables many type checking rules. Its use should be avoided.

(lint/suspicious/noExplicitAny)


[error] 216-216: Unexpected any. Specify a different type.

any disables many type checking rules. Its use should be avoided.

(lint/suspicious/noExplicitAny)


[error] 216-216: Unexpected any. Specify a different type.

any disables many type checking rules. Its use should be avoided.

(lint/suspicious/noExplicitAny)


[error] 229-229: Forbidden non-null assertion.

Unsafe fix: Replace with optional chain operator ?. This operator includes runtime checks, so it is safer than the compile-only non-null assertion operator

(lint/style/noNonNullAssertion)


[error] 230-230: Forbidden non-null assertion.

Unsafe fix: Replace with optional chain operator ?. This operator includes runtime checks, so it is safer than the compile-only non-null assertion operator

(lint/style/noNonNullAssertion)

src/fake_data/entity.ts

[error] 42-42: Unexpected any. Specify a different type.

any disables many type checking rules. Its use should be avoided.

(lint/suspicious/noExplicitAny)


[error] 68-68: Unexpected any. Specify a different type.

any disables many type checking rules. Its use should be avoided.

(lint/suspicious/noExplicitAny)

src/panels/lovelace/cards/hui-area-card.ts

[error] 427-427: Forbidden non-null assertion.

Unsafe fix: Replace with optional chain operator ?. This operator includes runtime checks, so it is safer than the compile-only non-null assertion operator

(lint/style/noNonNullAssertion)


[error] 427-427: Forbidden non-null assertion.

Unsafe fix: Replace with optional chain operator ?. This operator includes runtime checks, so it is safer than the compile-only non-null assertion operator

(lint/style/noNonNullAssertion)

Additional comments not posted (32)
cast/src/launcher/entrypoint.ts (1)

Line range hint 1-4: LGTM! Import adjustments are correct.

The import changes align with the summary and appear correct.

demo/src/entrypoint.ts (1)

Line range hint 1-5: LGTM! Import adjustments are correct.

The import changes align with the summary and appear correct.

src/entrypoints/authorize.ts (1)

Line range hint 1-9: LGTM! Import adjustments are correct.

The import changes align with the summary and appear correct.

src/entrypoints/onboarding.ts (1)

Line range hint 1-15: LGTM! Import adjustments and global declaration are correct.

The import changes align with the summary and appear correct. The global declaration for window.stepsPromise is appropriate.

pyproject.toml (1)

7-7: LGTM! Version update is correct.

The version update aligns with the summary and appears correct.

hassio/src/entrypoint.ts (1)

1-1: Verify the impact of removing safari-14-attachshadow-patch import.

The removal of the safari-14-attachshadow-patch import might affect the behavior on Safari 14. Ensure that this change does not introduce any regressions.

Verification successful

Verification Successful: No issues found due to the removal of safari-14-attachshadow-patch import.

The safari-14-attachshadow-patch import is not referenced anywhere else in the codebase, indicating that its removal does not introduce any regressions.

  • No further action is required.
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the removal of `safari-14-attachshadow-patch` import does not introduce regressions.

# Test: Search for usage of the `safari-14-attachshadow-patch` import. Expect: No usage or alternative handling.
rg --type js --pattern 'safari-14-attachshadow-patch'

Length of output: 465



Script:

#!/bin/bash
# Description: Verify the removal of `safari-14-attachshadow-patch` import does not introduce regressions.

# Test: Search for usage of the `safari-14-attachshadow-patch` import. Expect: No usage or alternative handling.
rg 'safari-14-attachshadow-patch' --type js

Length of output: 43

build-scripts/env.cjs (1)

35-37: LGTM! The isDevContainer function is a useful addition.

The function correctly checks if the environment is a development container.

.devcontainer/devcontainer.json (1)

11-11: LGTM! The DEV_CONTAINER environment variable is a useful addition.

Setting this variable helps identify the development container environment.

build-scripts/gulp/webpack.js (1)

43-48: LGTM! The modifications to runDevServer improve flexibility.

The changes dynamically set the listenHost parameter based on the environment, enhancing compatibility with development containers.

src/entrypoints/custom-panel.ts (1)

1-1: Verify the impact of removing safari-14-attachshadow-patch import.

The removal of the safari-14-attachshadow-patch import might affect the behavior on Safari 14. Ensure that this change does not introduce any regressions.

src/entrypoints/core.ts (2)

Line range hint 48-48: LGTM!

The code changes are approved.

Tools
Biome

[error] 30-30: Unexpected any. Specify a different type.

any disables many type checking rules. Its use should be avoided.

(lint/suspicious/noExplicitAny)


Line range hint 78-78: LGTM!

The code changes are approved.

Tools
Biome

[error] 30-30: Unexpected any. Specify a different type.

any disables many type checking rules. Its use should be avoided.

(lint/suspicious/noExplicitAny)

src/components/data-table/dialog-data-table-settings.ts (7)

Line range hint 21-24: LGTM!

The code changes are approved.

Tools
Biome

[error] 215-215: Unexpected any. Specify a different type.

any disables many type checking rules. Its use should be avoided.

(lint/suspicious/noExplicitAny)


[error] 216-216: Unexpected any. Specify a different type.

any disables many type checking rules. Its use should be avoided.

(lint/suspicious/noExplicitAny)


[error] 216-216: Unexpected any. Specify a different type.

any disables many type checking rules. Its use should be avoided.

(lint/suspicious/noExplicitAny)


[error] 229-229: Forbidden non-null assertion.

Unsafe fix: Replace with optional chain operator ?. This operator includes runtime checks, so it is safer than the compile-only non-null assertion operator

(lint/style/noNonNullAssertion)


[error] 230-230: Forbidden non-null assertion.

Unsafe fix: Replace with optional chain operator ?. This operator includes runtime checks, so it is safer than the compile-only non-null assertion operator

(lint/style/noNonNullAssertion)


Line range hint 26-29: LGTM!

The code changes are approved.

Tools
Biome

[error] 215-215: Unexpected any. Specify a different type.

any disables many type checking rules. Its use should be avoided.

(lint/suspicious/noExplicitAny)


[error] 216-216: Unexpected any. Specify a different type.

any disables many type checking rules. Its use should be avoided.

(lint/suspicious/noExplicitAny)


[error] 216-216: Unexpected any. Specify a different type.

any disables many type checking rules. Its use should be avoided.

(lint/suspicious/noExplicitAny)


[error] 229-229: Forbidden non-null assertion.

Unsafe fix: Replace with optional chain operator ?. This operator includes runtime checks, so it is safer than the compile-only non-null assertion operator

(lint/style/noNonNullAssertion)


[error] 230-230: Forbidden non-null assertion.

Unsafe fix: Replace with optional chain operator ?. This operator includes runtime checks, so it is safer than the compile-only non-null assertion operator

(lint/style/noNonNullAssertion)


Line range hint 31-51: LGTM!

The code changes are approved.

Tools
Biome

[error] 215-215: Unexpected any. Specify a different type.

any disables many type checking rules. Its use should be avoided.

(lint/suspicious/noExplicitAny)


[error] 216-216: Unexpected any. Specify a different type.

any disables many type checking rules. Its use should be avoided.

(lint/suspicious/noExplicitAny)


[error] 216-216: Unexpected any. Specify a different type.

any disables many type checking rules. Its use should be avoided.

(lint/suspicious/noExplicitAny)


[error] 229-229: Forbidden non-null assertion.

Unsafe fix: Replace with optional chain operator ?. This operator includes runtime checks, so it is safer than the compile-only non-null assertion operator

(lint/style/noNonNullAssertion)


[error] 230-230: Forbidden non-null assertion.

Unsafe fix: Replace with optional chain operator ?. This operator includes runtime checks, so it is safer than the compile-only non-null assertion operator

(lint/style/noNonNullAssertion)


Line range hint 53-204: LGTM!

The code changes are approved.

Tools
Biome

[error] 215-215: Unexpected any. Specify a different type.

any disables many type checking rules. Its use should be avoided.

(lint/suspicious/noExplicitAny)


[error] 216-216: Unexpected any. Specify a different type.

any disables many type checking rules. Its use should be avoided.

(lint/suspicious/noExplicitAny)


[error] 216-216: Unexpected any. Specify a different type.

any disables many type checking rules. Its use should be avoided.

(lint/suspicious/noExplicitAny)


[error] 229-229: Forbidden non-null assertion.

Unsafe fix: Replace with optional chain operator ?. This operator includes runtime checks, so it is safer than the compile-only non-null assertion operator

(lint/style/noNonNullAssertion)


[error] 230-230: Forbidden non-null assertion.

Unsafe fix: Replace with optional chain operator ?. This operator includes runtime checks, so it is safer than the compile-only non-null assertion operator

(lint/style/noNonNullAssertion)


205-251: LGTM!

The code changes are approved.

Tools
Biome

[error] 215-215: Unexpected any. Specify a different type.

any disables many type checking rules. Its use should be avoided.

(lint/suspicious/noExplicitAny)


[error] 216-216: Unexpected any. Specify a different type.

any disables many type checking rules. Its use should be avoided.

(lint/suspicious/noExplicitAny)


[error] 216-216: Unexpected any. Specify a different type.

any disables many type checking rules. Its use should be avoided.

(lint/suspicious/noExplicitAny)


[error] 229-229: Forbidden non-null assertion.

Unsafe fix: Replace with optional chain operator ?. This operator includes runtime checks, so it is safer than the compile-only non-null assertion operator

(lint/style/noNonNullAssertion)


[error] 230-230: Forbidden non-null assertion.

Unsafe fix: Replace with optional chain operator ?. This operator includes runtime checks, so it is safer than the compile-only non-null assertion operator

(lint/style/noNonNullAssertion)


Line range hint 253-259: LGTM!

The code changes are approved.

Tools
Biome

[error] 215-215: Unexpected any. Specify a different type.

any disables many type checking rules. Its use should be avoided.

(lint/suspicious/noExplicitAny)


[error] 216-216: Unexpected any. Specify a different type.

any disables many type checking rules. Its use should be avoided.

(lint/suspicious/noExplicitAny)


[error] 216-216: Unexpected any. Specify a different type.

any disables many type checking rules. Its use should be avoided.

(lint/suspicious/noExplicitAny)


[error] 229-229: Forbidden non-null assertion.

Unsafe fix: Replace with optional chain operator ?. This operator includes runtime checks, so it is safer than the compile-only non-null assertion operator

(lint/style/noNonNullAssertion)


[error] 230-230: Forbidden non-null assertion.

Unsafe fix: Replace with optional chain operator ?. This operator includes runtime checks, so it is safer than the compile-only non-null assertion operator

(lint/style/noNonNullAssertion)


Line range hint 261-294: LGTM!

The code changes are approved.

Tools
Biome

[error] 215-215: Unexpected any. Specify a different type.

any disables many type checking rules. Its use should be avoided.

(lint/suspicious/noExplicitAny)


[error] 216-216: Unexpected any. Specify a different type.

any disables many type checking rules. Its use should be avoided.

(lint/suspicious/noExplicitAny)


[error] 216-216: Unexpected any. Specify a different type.

any disables many type checking rules. Its use should be avoided.

(lint/suspicious/noExplicitAny)


[error] 229-229: Forbidden non-null assertion.

Unsafe fix: Replace with optional chain operator ?. This operator includes runtime checks, so it is safer than the compile-only non-null assertion operator

(lint/style/noNonNullAssertion)


[error] 230-230: Forbidden non-null assertion.

Unsafe fix: Replace with optional chain operator ?. This operator includes runtime checks, so it is safer than the compile-only non-null assertion operator

(lint/style/noNonNullAssertion)

src/fake_data/provide_hass.ts (4)

Line range hint 1-279: LGTM!

The code changes are approved.


281-284: LGTM!

The code changes are approved.


Line range hint 286-290: LGTM!

The code changes are approved.


Line range hint 292-292: LGTM!

The code changes are approved.

src/fake_data/entity.ts (6)

13-24: LGTM!

The code changes are approved.


44-45: LGTM!

The code changes are approved.


53-65: LGTM!

The code changes are approved.


103-112: LGTM!

The code changes are approved.


225-230: LGTM!

The code changes are approved.


335-347: LGTM!

The code changes are approved.

src/panels/lovelace/cards/hui-area-card.ts (2)

Line range hint 418-441: LGTM!

The code changes are approved.

Tools
Biome

[error] 427-427: Forbidden non-null assertion.

Unsafe fix: Replace with optional chain operator ?. This operator includes runtime checks, so it is safer than the compile-only non-null assertion operator

(lint/style/noNonNullAssertion)


[error] 427-427: Forbidden non-null assertion.

Unsafe fix: Replace with optional chain operator ?. This operator includes runtime checks, so it is safer than the compile-only non-null assertion operator

(lint/style/noNonNullAssertion)


591-593: LGTM!

The code changes are approved.

src/panels/lovelace/cards/hui-media-control-card.ts (1)

Line range hint 1-1: Verify the impact of removing the getLayoutOptions method.

Ensure that removing the getLayoutOptions method does not affect other parts of the class or the application.

Verification successful

Verification Successful: No Impact from Removing getLayoutOptions Method

The getLayoutOptions method was not found in use within the HuiMediaControlCard class or in any other related files. Therefore, removing this method does not impact other parts of the class or the application.

  • No direct references to HuiMediaControlCard in files where getLayoutOptions is used.
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the removal of the `getLayoutOptions` method.

# Test: Search for the method usage. Expect: No occurrences of `getLayoutOptions`.
rg --type typescript 'getLayoutOptions'

Length of output: 74



Script:

#!/bin/bash
# Description: Verify the removal of the `getLayoutOptions` method.

# Test: Search for the method usage. Expect: No occurrences of `getLayoutOptions`.
rg --type ts 'getLayoutOptions'

Length of output: 1590



Script:

#!/bin/bash
# Description: Verify the impact of removing the `getLayoutOptions` method from `HuiMediaControlCard`.

# Test: Search for references to `HuiMediaControlCard` in files where `getLayoutOptions` is used.
rg --type ts 'HuiMediaControlCard' src/panels/lovelace/sections/hui-grid-section.ts src/panels/lovelace/cards/hui-button-card.ts src/panels/lovelace/cards/hui-map-card.ts src/panels/lovelace/cards/hui-sensor-card.ts src/panels/lovelace/cards/hui-tile-card.ts src/panels/lovelace/cards/hui-weather-forecast-card.ts src/panels/lovelace/cards/hui-iframe-card.ts src/panels/lovelace/cards/hui-humidifier-card.ts src/panels/lovelace/cards/hui-statistic-card.ts src/panels/lovelace/cards/hui-thermostat-card.ts src/panels/lovelace/cards/hui-entity-card.ts src/panels/lovelace/cards/hui-area-card.ts src/panels/lovelace/cards/hui-card.ts

Length of output: 630


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added Supervisor Related to the supervisor panel Cast Related to Home Assistant Cast UI Build Related to building the code Demo Related to frontend demo content Design Related to Home Assistant design gallery labels Jul 3, 2024
@bramkragten bramkragten merged commit 58ba9f6 into master Jul 3, 2024
16 checks passed
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

@@ -25,7 +25,6 @@ import { subscribePanels } from "../data/ws-panels";
import { subscribeThemes } from "../data/ws-themes";
import { subscribeUser } from "../data/ws-user";
import type { ExternalAuth } from "../external_app/external_auth";
import "../resources/safari-14-attachshadow-patch";

window.name = MAIN_WINDOW_NAME;
(window as any).frontendVersion = __VERSION__;
Copy link
Contributor

Choose a reason for hiding this comment

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

Specify a different type instead of any.

Using any disables many type checking rules. Avoid its use by specifying a different type.

-  } catch (err: any) {
+  } catch (err: unknown) {

Committable suggestion was skipped due to low confidence.

Tools
Biome

[error] 30-30: Unexpected any. Specify a different type.

any disables many type checking rules. Its use should be avoided.

(lint/suspicious/noExplicitAny)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build Related to building the code Cast Related to Home Assistant Cast UI cla-signed Demo Related to frontend demo content Design Related to Home Assistant design gallery Supervisor Related to the supervisor panel
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants