Skip to content
This repository was archived by the owner on Sep 18, 2023. It is now read-only.

Only allow string literal as tag name values. - #33

Merged
koddsson merged 2 commits into
mainfrom
give-up-if-tag-name-doesnt-have-a-value
Oct 11, 2021
Merged

Only allow string literal as tag name values.#33
koddsson merged 2 commits into
mainfrom
give-up-if-tag-name-doesnt-have-a-value

Conversation

@koddsson

@koddsson koddsson commented Oct 8, 2021

Copy link
Copy Markdown
Contributor

This is to prevent the rule from blowing up if there's no value property on the first argument such as if the argument is an expression.

const tagName = 'my-cool-element'

window.customElements.define(tagName, class extends HTMLElement)

@koddsson
koddsson requested a review from keithamus October 8, 2021 14:03

@keithamus keithamus left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍 great!

@koddsson
koddsson merged commit 39f6d67 into main Oct 11, 2021
@koddsson
koddsson deleted the give-up-if-tag-name-doesnt-have-a-value branch October 11, 2021 12:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants