As with many of our decisions in the style guide, I feel we should opt for the solution that's easiest to lint.
toJson
MdnLink
svgToPng
For brands, we should simply ignore casing and apply normal conventions (not lintable):
githubProfile
youtubeVideo
paypalAccount
Unfortunately it's difficult to know programatically* if the XMLHTTP in XMLHTTPRequest is one or more acronyms, or a word that's incorrectly uppercased, just as it's impossible to know the opposite.
What are we trying to solve
To enforce consistent casing for acronyms.
Examples:
toJson
vstoJSON
MdnLink
vsMDNLink
githubProfile
vsgitHubProfile
There are many views on this, and many valid arguments for either approach.
Research
Recommendation
As with many of our decisions in the style guide, I feel we should opt for the solution that's easiest to lint.
toJson
MdnLink
svgToPng
For brands, we should simply ignore casing and apply normal conventions (not lintable):
githubProfile
youtubeVideo
paypalAccount
Unfortunately it's difficult to know programatically* if the
XMLHTTP
inXMLHTTPRequest
is one or more acronyms, or a word that's incorrectly uppercased, just as it's impossible to know the opposite.*Assuming we're not writing rules that use ML.