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

component-selector-name: should it really warn for names without dashes? #68

Closed
chapati23 opened this issue Jul 19, 2016 · 4 comments
Closed

Comments

@chapati23
Copy link

I'm a fan of concise code and naming (not obscure acronyms , just short names). So I like to keep my component names short. For example:

@Component({
  selector: 'transaction'
})

This throws a no-kebab-case warning. IMO a simple string without any capitalisation or special characters should pass this rule and not fail.

@mgechev, bug or just different opinions?

@mgechev
Copy link
Owner

mgechev commented Jul 19, 2016

Yes, it should throw a warning. transaction is not a valid name for a custom Web Component.

@mgechev mgechev closed this as completed Jul 19, 2016
@chapati23
Copy link
Author

in case anyone else stumbles over this: http://www.w3.org/TR/custom-elements/#valid-custom-element-name

custom element spec requires a hypen to "force-avoid" naming conflicts with other custom elements.

@Igonato
Copy link

Igonato commented Sep 3, 2016

@mgechev how about an option that would allow names without a hyphen. Would be happy to make a PR if you are ok with it.

@mgechev
Copy link
Owner

mgechev commented Sep 3, 2016

Since selectors without a dash are not valid I don't think we should consider them.

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

3 participants