Open ThijsTyZ opened 2 years ago
I agree that the rule itself doesn't have a proper explanation or examples.
But I don't agree that we should outright remove it.
I'd rather replace the name with something like module level constant
, and keep them.
IMO there is still value in visually seeing what the intent of a variable is. But maybe that's just something we got used to.
The counter argument is that we almost got rid of almost everything else.
arrItems
or strName
ILoadable
interface prefix_privateName
variablesOnly classes/types/enums are left with PascalCase
, and these CONST
s.
For reference, the AirBnB reasoning: https://github.com/airbnb/javascript#naming--uppercase
At the moment we have different casing for "Globally used constants", see https://github.com/mediamonks/frontend-coding-standards#globally-used-constants This rule got introduced back in the days when we only had
var
and there was no way to make something "read only". We no longer need this rule.Also it's too vague what "global" means. We should avoid having vague rules in our standards.
Do you agree?