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

no-input-rename rule should allow aliasing dashed properties #663

Closed
mertdeg2 opened this issue Jun 19, 2018 · 3 comments
Closed

no-input-rename rule should allow aliasing dashed properties #663

mertdeg2 opened this issue Jun 19, 2018 · 3 comments

Comments

@mertdeg2
Copy link

mertdeg2 commented Jun 19, 2018

Specifically, something like this should be allowed:

@Input('aria-label') ariaLabel: string;

In above, we can't have a variable called aria-label. TS code wouldn't compile, and JS engine would complain invalid left hand side assignment.

@rafaelss95
Copy link
Collaborator

Interesting.. while I agree with the specific case mentioned in OP, I'm not sure what can be done.

If inputs kebab-cased become allowed, what will prevent something strange like @Input('my-input') myInput: string;?

Are any other cases besides the aria-* family? If not, we could create a "whitelist" (not sure where we could retrieve all the aria-* attributes) with them and don't report warnings.

@mgechev thoughts?

@mgechev
Copy link
Owner

mgechev commented Jun 19, 2018

Regex to whitelist names makes sense.

@rafaelss95
Copy link
Collaborator

Whitelist only for aria-* family then? Btw, I found this reference.

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