DEV Community

Discussion on: How should we indent `const` declarations?

Collapse
 
fpuffer profile image
Frank Puffer

But why? As soon as you run any code formatter over it, it will change indentation. Or do you know any code formatter that makes a difference between var and const?

Also, when working together with other developers, you should typically adhere to coding guidelines. Often these coding guidelines are enforced meaning that you won't be able to check in your code if they are not met. I have not heard of coding guidelines with such complicated indentation rules.

Collapse
 
kenbellows profile image
Ken Bellows

I take your point regarding current practicality, but I think we should leave aside current patterns and tooling for this discussion. The point of this article is to question. what beat practices should be in the first place. Formatters and standards can always be updated if accepted best practices change.

Thread Thread
 
fpuffer profile image
Frank Puffer

Good point - we should never stop thinking about how we could improve the current state.