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

Rule for making sure keys properly maintain case when being set #83

Open
triwav opened this issue Feb 8, 2023 · 0 comments
Open

Rule for making sure keys properly maintain case when being set #83

triwav opened this issue Feb 8, 2023 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@triwav
Copy link

triwav commented Feb 8, 2023

In a Roku app if you do the following:

aa = {}
aa.myCamelCaseKey = "myCamelCaseValue"

myCamelCaseKey is now stored as mycamelcasekey.

If you instead set the value like:

aa = {}
aa["myCamelCaseKey"] = "myCamelCaseValue"

then it properly maintains its casing.

It would be great if there was a bslint rule that could have the options of either always requiring values to be set with the brackets instead of dot or only when the value contains a capital character or off.

Another rule related to this would be with requiring quotes when specifying keys while creating an AA. As an example:

aa = {
  "myCamelCaseKey": "myCamelCaseValue"
}

Will properly maintain casing while if quotes are not used it won't. This could have the same options of either always requiring values to be set with the brackets instead of dot or only when the value contains a capital character or off.

@TwitchBronBron TwitchBronBron added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed labels Jun 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants