it's a rule and not a bug.
Variable names follow the same rules as other labels in PHP. A valid variable name starts with a letter or underscore, followed by any number of letters, numbers, or underscores. As a regular expression, it would be expressed thus: '[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*'
Unfortunately, I do not know OFA to the last detail but only from a short review of the code. Especially not the JS parts.
However, I have seen that in different places the module name is also used as a variable name. As well as table names and field names in the database.
At least in PHP are hyphens in variable names not allowed (see Quote). Likewise, mySql can cause problems in strict mode. Also, I can vaguely remember that JS has several problems here too.
The simplest and most important solution is not to use hyphens in module names. There are absolutely no factual reasons for their use.