By not using literals everywhere.
All literals are defined somewhere (start of function, class etc) as enums or vars and used.
Just because I have 20 usage of 'shipping_address' doesn't mean I'll have this string 20 times in different places.
Grep has its place and I often need to grep code base which have been written without much thoughts towards DX. But writing it nicely allows LSP to take over.
Just because I have 20 usage of 'shipping_address' doesn't mean I'll have this string 20 times in different places.
Grep has its place and I often need to grep code base which have been written without much thoughts towards DX. But writing it nicely allows LSP to take over.