-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
feat: add strictSnakeCase option to rule attribute-names #207
Conversation
i feel like if we're to do this, we should provide a more generic option to account for the current behaviour too e.g. |
195a4d6
to
2006a29
Compare
2006a29
to
367f5ce
Compare
Here it is with style option. By default no style is applied, same behavior a before. |
i understand better now currently (in this PR), we have two behaviours:
the confusion here is that maybe we should rename
|
I updated with convention instead of style But I don't fully get this part :
It's ok for not changing current rule behavior if convention is not defined. But I don't see how we can have a default value for convention. Either it's not specified and we keep current rule behavior or we define a convention, and to define it, it must have a value, we can not have default value for it. In that case, |
i pushed a few changes, maybe that'll help you understand having what i was trying to point out was that these two things are separate:
all attributes, regardless of convention, need to be lowercase. in the commit i pushed, i've moved the code out of the condition so it always runs. separately, if the attribute was lowercase, we then enforce a particular naming convention if one is set |
I pushed a small documentation update, are you requesting more updates on this PR ? |
Looks good to me! Thanks a lot for seeing this through 🙏 |
I would like to force attribute name to be the exact snake-case version of property, like PolymerJS did, I added option
strictSnakeCase
to attribute-names rule to check that.With that option, the only possible attributes values are