You know what they say about assuming, but in this case it’s perfectly acceptable! First off, constants have to be initialized or JS throws a hissie fit, therefor if I create an empty constant array that I intend to fill at a later point in the code, Sonar should leave it well enough alone. On the hand, if it were declared as a let as an empty array, that would make more since of an error to through.
Welcome to the community!
I’m sorry but it is not clear to me if you found some issue with an existing SonarQube / SonarCloud / SonarLint rule or if you are suggesting a new rule.
If it is a new rule suggestion could you please provide a description and examples of Noncompliant and Compliant code.