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

Unknown attribute false positive #351

Open
JimSchofield opened this issue Jan 22, 2024 · 0 comments
Open

Unknown attribute false positive #351

JimSchofield opened this issue Jan 22, 2024 · 0 comments

Comments

@JimSchofield
Copy link

JimSchofield commented Jan 22, 2024

Stackblitz with issue: (run lit-analyzer src to see output)
https://stackblitz.com/edit/vitejs-vite-o6yr4r?file=src%2Fmy-element.ts

output

❯ lit-analyzer src
Analyzing 2 files...

./src/my-element.ts

    Unknown attribute 'password-toggle'. Did you mean '?passwordToggle'?
    13:  ?password-toggle=${this.passwordToggle}
    no-unknown-attribute


  ✖ 1 problem in 1 file (0 errors, 1 warning)

We can verify that the attribute exists on the shoelace component:
https://github.com/shoelace-style/shoelace/blob/next/src/components/input/input.component.ts#L122

It seems to happen only when strict is used in the tsconfig

Originally posted by @JimSchofield in #181 (comment)

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

No branches or pull requests

1 participant