-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
APIs: camelCase, snake_case and dot-notation #1550
Comments
This doesn't appear to be a bug report or a request for a change, so closing. Please use the mailing list for general questions. Fwiw, in my own projects I just disable camel-case around the API response. |
Sorry. Will post to the google group. |
@malandrew not sure what sort of response you got, but my proposal is to add an |
That rule sounds good so long as there is an option for only applying it to property access. i.e. Function calls (methods or library functions) would still need to adhere to camelCase Good:
Bad:
|
It's not uncommon to make requests to an API that returns a JSON object with keys that are not in camelcase (especially if the API is written by pythonistas or people from any other community that prefers snake_case).
In this scenario, you will often find yourself accessing a property that results in linting warnings for the camelcase rule.
Some thoughts on this:
I don't really have a good idea yet how this use case might be addressed by eslint trap, so I'm curious what others are doing in this scenario.
The text was updated successfully, but these errors were encountered: