Closed DenisIzmaylov closed 7 years ago
Thanks for watching! And there is also a rule about capitalized acronyms here https://github.com/airbnb/javascript#naming--Acronyms-and-Initialisms
So we have discussed a little with @kof (https://github.com/cssinjs/styled-jss/pull/1#discussion_r112584469, https://github.com/cssinjs/styled-jss/pull/1#discussion_r112573844) about this style too, and I see this way:
This rule ( https://github.com/airbnb/javascript#naming--Acronyms-and-Initialisms ):
Acronyms and initialisms should always be all capitalized, or all lowercased.
Provides a two variants. More variants - more complexity and errors. I'd just like to see less complexity and less errors in our projects.
use lowercase for instances, PascalCase for classes/constructors
This rule is not applying for acronyms according to the rule above.
use strict camelCase for everything except CONSTANTS
As I provided the examples in the original post - native API is not satisfying to this rule.
Generally the developers asking themself in trying to write code at first time:
It means - a new custom rule will add a cognitive complexity:
P.S.
I don't understand the issue
Javascript is not consistent with that as well: for e.g. XMLHttpRequest - even in one word 2 different conventions.
Using strict version is easier, we don't need to think how to name it. Less rules apply. Its also a very popular convention, I would rather stick with this.
me too
Also with strictCamelCase its possible to convert from snake_case automatically. Which is often important in the applications when dealing with the http API's which are mostly written in snake.
lets not change anything for now and re-iterate in a few months
Basic requirements:
Current state:
README:
Probably other places (did not explored the source code deeply yet).