I have 3+ years of experience in Product Engineering. The challenges of scaling and improving UI is my motivation for learning new things. I’m dedicated to focus on UX and writing clean, modular code.
Great article, I have been there and done that, Now we have pipelines taking care of linting issues at least.
I have an opinion about auto fixable issues. For example: if we talk about let vs const which can be auto-fixed.
But in the case of objects, it might produce ambiguity in code readability.
if we are doing let a = {}; a.foo = "bar" (which is not a correct way to mutate objects but this can be found in codebase), eslint throws error and can be auto fixed to const a = {}. But this is wrong as the object is not a constant and we are changing the properties.
Thank you. I honestly don’t know all the edge cases of auto fixing and I agree that has to be used with caution.
Your example would be fine for me since const only checks if the reference changes (or if it is a primitive it would behave as you would expect and checks the value). I use const almost exclusively. But I guess that’s also personal style.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Great article, I have been there and done that, Now we have pipelines taking care of linting issues at least.
I have an opinion about auto fixable issues. For example: if we talk about let vs const which can be auto-fixed.
But in the case of objects, it might produce ambiguity in code readability.
if we are doing
let a = {}; a.foo = "bar"
(which is not a correct way to mutate objects but this can be found in codebase), eslint throws error and can be auto fixed toconst a = {}
. But this is wrong as the object is not a constant and we are changing the properties.Thank you. I honestly don’t know all the edge cases of auto fixing and I agree that has to be used with caution.
Your example would be fine for me since const only checks if the reference changes (or if it is a primitive it would behave as you would expect and checks the value). I use const almost exclusively. But I guess that’s also personal style.