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

bug: Broken links in the source code in issueWarning() #1350

Open
maxpatiiuk opened this issue Jul 12, 2024 · 3 comments
Open

bug: Broken links in the source code in issueWarning() #1350

maxpatiiuk opened this issue Jul 12, 2024 · 3 comments

Comments

@maxpatiiuk
Copy link
Contributor

Not quite sure if this is a bug in https://github.com/lit/lit/ or https://github.com/lit/lit.dev

@lit/reactive-element emits warnings in certain cases when in dev mode. These warnings include links to the docs. Some of the links emitted by @lit/reactive-element no longer work, returning a 404 page:

@maxpatiiuk
Copy link
Contributor Author

site node: sad to learn that overwriting createProperty is deprecated. I was using it to overwrite defaults (i.e make all attributes be kebab-case by default rather than lowercase). I guess I can create a wrapper around Lit's @property() decorator and have ESLint no-restricted-imports forbid importing the decorator directly from Lit, or do a build-step plugin...

@maxpatiiuk
Copy link
Contributor Author

Also, it looks like not all warnings are disableable - only 3 kinds are. Is there a reason for that?
My workaround for now is to create global.litIssuedWarnings in global scope and push to it before Lit is loaded.
In particular, I am disabling the Lit is in dev mode. Not recommended for production! warning when my Vite is running in dev mode and the Overriding ReactiveElement.createProperty() is deprecated warning (up until that deprecated property is removed, which hopefully won't happen till stable decorators land in all browsers and experimental decorator support is removed)

@augustjk
Copy link
Member

Originally posted issue is a duplicate of #1262

But I don't have an answer for why not all warnings are in that type. My guess would be they just got overlooked.

As you deduced, the plan is for createProperty() to stay until we make decorators the only way to define properties, and remove static properties and experimental decorators.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

2 participants