DEV Community

Discussion on: Stop waving the wand of magic numbers

Collapse
 
mortoray profile image
edA‑qa mort‑ora‑y

I'm not so happy with their detectObjects rule. I like grouping my constants into objects, but they seem to encourage making them all static globals. I guess it's configurable though.

Collapse
 
gmartigny profile image
Guillaume Martigny

The default value for "detectObjects" seems to be false, meaning it will allow you to put magic numbers inside objects (like you do). You don't have to activate the rule, and I think constants under "enums" is a great thing.